I am trying to develop a multi series line graph in grafana with mysql queries.
Here I had two mysql query , but the graphs appear in continuous manner and not in multi series line manner.
Here the x-axis (months) are repeating and the graph is not overlapping. Kindly suggest for this.
Below I pasted the two queries
Query A:
SELECT
UNIX_TIMESTAMP(creation_Date) as time_sec,
count(status) as value,
month as metric
FROM `'january'`
where Source='Doors'
group by status
UNION
SELECT
UNIX_TIMESTAMP(creation_Date) as time_sec,
count(status) as value,
month as metric
FROM `'feburary'`
where Source='Doors'
group by status
UNION
SELECT
UNIX_TIMESTAMP(creation_Date) as time_sec,
count(status) as value,
month as metric
FROM `'march'`
where Source='Doors'
group by status
UNION
SELECT
UNIX_TIMESTAMP(creation_Date) as time_sec,
count(status) as value,
month as metric
FROM `'april'`
where Source='Doors'
group by status
UNION
SELECT
UNIX_TIMESTAMP(creation_Date) as time_sec,
count(status) as value,
month as metric
FROM `'may'`
where Source='Doors'
group by status;
QueryB:
SELECT
UNIX_TIMESTAMP(creation_Date) as time_sec,
count(status) as value,
month as metric
FROM `'january'`
where Source='RTC'
group by status
UNION
SELECT
UNIX_TIMESTAMP(creation_Date) as time_sec,
count(status) as value,
month as metric
FROM `'feburary'`
where Source='RTC'
group by status
UNION
SELECT
UNIX_TIMESTAMP(creation_Date) as time_sec,
count(status) as value,
month as metric
FROM `'march'`
where Source='RTC'
group by status
UNION
SELECT
UNIX_TIMESTAMP(creation_Date) as time_sec,
count(status) as value,
month as metric
FROM `'april'`
where Source='RTC'
group by status
UNION
SELECT
UNIX_TIMESTAMP(creation_Date) as time_sec,
count(status) as value,
month as metric
FROM `'may'`
where Source='RTC'
group by status;