how do you define old season? stuff in 2024?
again the question still is: how would you do this outside of grafana? in MariaDB query tool?
btw: very helpful for folks that try to help you
DDL: data definition language, tells us what data schema looks like along with column name and data type,
DML: data manipulation language, tells us what the data looks like which you did provide
so there are tricks in some db languages where you can pull past dates metrics into the future but then you need to differentiate them from current date metrics
Now the above is based on the following mock data query it could give you an idea of what I am doing, though some values are static, it is not to be copy pasta’d but to give you a hint on what you could do. again this seems to be not a grafana issue but data source query tricks issue
;with playa
as(
select 2 as id, 'Anni' as player, 0 as score,'2024-11-07' as datetime union
select 3, 'Anni',-24,'2024-12-05' union
select 4, 'Anni',-24,'2024-12-12' union
select 5, 'Anni',-24,'2024-12-19' union
select 6, 'Anni',-9,'2025-01-09' union
select 7, 'Anni',-9,'2025-01-16' union
select 8, 'Bella', 17,'2024-11-07' union
select 9, 'Bella', -5,'2024-12-05' union
select 10, 'Bella', -5,'2024-12-12' union
select 11, 'Bella', -5,'2024-12-19' union
select 12, 'Bella', -31,'2025-01-09' union
select 13, 'Bella', 48,'2025-01-16'
)
select case year(cast(datetime as datetime))
when 2024 then concat(player, ' 2024') else player end
as metric,
score as value,
case year(cast(datetime as datetime))
when 2024 then dateadd(yy, 1, cast(datetime as datetime)) else cast(datetime as datetime) end as [time]
from playa
order by 3 asc