Time series daily graph for MSSQL Datasource

Hi,

I am using MSSQL as my datasource, I am trying to count the number of Situations created for each day. Similar to below (Output of my SQL query.), a plot for each day in my graph.

image

i have a similar query for hourly graph and it is working.

SELECT
$__timeGroup(created_at, ‘1h’, 0) AS time,
count(SituationNo) as SIGcount, count(incident) as INCcount
FROM report
GROUP BY $__timeGroup(created_at, ‘1h’, 0)
ORDER BY 1

But when i use the same query and change ‘h’ to ‘d’, i get an error - error parsing interval ‘2d’.

Please help me with this issue.

-Abhi

1 Like