Good afternoon, I have a table in a PostgreSQL database that has a set of data written to it at different intervals.
For example, 10 minutes of data being written to the table, then 8 hours of no data, then again 10 minutes of receiving data, then 13 hours of no data, and again 10 minutes of receiving data.
The thing is, the intervals are always different. I can say for sure that the recording time is always no more than 10 minutes and I know the start and end time of receiving data.
Based on this table I want to create dashboards in grafana and compare visually the last 3 datasets. Is it possible to do this?
Each dataset has its own sequence number in the PostgreSQL table, so the condition in the query can be written like this
...
WHERE date >= to_timestamp(${__from} / 1000) and date < to_timestamp(${__to} / 1000) AND sessions_num = 2
But this naturally doesn’t work because it references the current total value of the interval
I think I need to override $__from and $__to for each chart, but I don’t know how to do that.
Also tried changing Relative time and Time shift. That works, but I also need to override those 2 parameters in each query.