Grafana line chart for sql server data

i want to visualize query
in a line chart.

My query is

select convert(varchar,rt.created_on,23) as DATE, sum(rt.rework_code_count) as VALUE from dbo.rework_tracker rt
join dbo.rework_error_code rec on rec.uuid = rt.rework_code_id
join dbo.stage s on s.uuid = rec.stage_id
join dbo.process p on p.uuid = s.process_id and p.value_stream_id=‘75D19D54-BD76-4858-9585-C3BF3B5FF245’
group by convert(varchar,rt.created_on,23)
order by 1 asc;

as of now am getting nothing.Any info on how i can achieve it will be helpfull.

Hi,

In order to use a line chart, you need to identify your ‘X-axix’ by using alias ‘time’.

He is my example:

SELECT csm_start AS time,
	xl AS "Przygotowanie z CDNXL",
	esb AS "Przygotowanie z ESB"
FROM TERG_Dashboard.dbo.CDNvsESB
WHERE csm_start >= DATEADD(DAY,-7,GETDATE())
AND PRZYGOTOWANIE_Z_XL IS NOT NULL
AND PRZYGOTOWANIE_Z_ESB IS NOT NULL
ORDER BY 1,2

obraz