I’ve just started with Grafana and I can’t find the right function for my task…
Simple example: I record the number of emails in the inbox every 1min.
In the database there is an absolute number that increases.
Now I want to do evaluations with Grafana…
How many new mails per hour or per day
The absolute values of the beginning and end of the set period must therefore be subtracted from each other…
The whole thing should then be displayed as a bar chart.
--MSSQL server
SELECT Concat(CAST(time as date), ' Hour: ', DATEPART(hour,time)) AS metric,
COUNT(*) AS Totals
FROM emails
GROUP BY CAST(time as date),
DATEPART(hour,time)