Hello,
I can’t figure out how to “split” the data returned from a single SQL query:
| timestamp | server | temperature |
--------------------------------------
| 2021-08-01 | 1 | 10 |
| 2021-08-01 | 2 | 21 |
| 2021-08-01 | 3 | 3 |
| 2021-08-02 | 1 | 11 |
| 2021-08-02 | 2 | 20 |
| 2021-08-02 | 3 | 4 |
into multiple time-series, and plot them on the same chart (see below):
Here is my SQL query:
SELECT
$__time("timestamp"),
"temperature"
FROM "temperature"
WHERE $__timeFilter("timestamp")
GROUP BY server, timestamp
ORDER BY timestamp ASC
Currently, only ONE time-series is being plotted on the time-series chart.
I expected Grafana to plot one time-series per server ID.
Any help would be much appreciated!
Thank you
- grafana version: v8.2.0-beta2
- datasource: Postgresql