Hello Helical,
I am using Helical Insight 4.0. I want to implement the following query. How is it possible?
select a.* from (
SELECT Date(data), ID, AVG(column), COUNT(1), 'FIRST' FROM database.tablename where someColumn= 'W'
and TIME(time) Between ('00:00:00') and ('05:59:59')
GROUP BY DATE(DATA)
union
SELECT Date(data), ID, AVG(column), COUNT(1), ‘SECOND’ FROM database.tablename where someColumn= 'W'
and TIME(time) Between ('00:00:00') and ('05:59:59')
GROUP BY DATE(DATA)
UNION
SELECT Date(data), ID, AVG(column), COUNT(1), 'THIRD' FROM database.tablename where someColumn= 'W'
and TIME(time) Between ('00:00:00') and ('05:59:59')
GROUP BY DATE(DATA)
) a
order by 1, 5,2;
Thank You,
Snow.