There is the timeshift function in the query editor but that is per panel and not per query. So you would have to have a panel per year.
It should be possible with SQL but it is trickier. TSDB's like Prometheus, Graphite and Influxdb (Flux) have the timeshift function built into their query languages. (https://community.grafana.com/t/advanced-graphing-part2-visu...)