I have two queries with similar data(one with previous period and other with current). I need to display this in a kendo line chart. How can I do so**
select date_trunc('hour' , "CreateDateTime"::TIMESTAMP) as c,
count(1) as d
from "ROBOT"
where "CreateDateTime"::TIMESTAMP between '2018-04-01' and '2018-04-22'
group by date_trunc('hour', "CreateDateTime"::TIMESTAMP)
UNION ALL
select date_trunc('hour' , "CreateDateTime"::TIMESTAMP) as a,
count(1) as b
from "ROBOT"
where "CreateDateTime"::TIMESTAMP between '2018-05-01' and '2018-05-22'
group by date_trunc('hour', "CreateDateTime"::TIMESTAMP);