I’m getting stuck in yet another graphing issue.
Inspired by this post https://localhost:3000/t/creating-stacked-bar-charts-on-grafana-using-data-from-sql-server/8200/5 I’m trying to fetch my data with this query:
SELECT
$__timeGroup(EPOCH, '24h') as time,
SHIFTNUMBER as metric,
count(DATESHORT)
FROM
RPT_PRODHEADER
WHERE
EPOCH >= $__unixEpochFrom() AND EPOCH <= $__unixEpochTo()
GROUP BY
$__timeGroup(EPOCH, '24h'),
SHIFTNUMBER
ORDER BY 1
The data is looking like this in the DB
My whish is to show the number of “DATESHORT” occurrences per “SHIFTNUMBER” by every 24 hours, in either separate or stacked bars.
Any help appreciated.
Best regards Ole