I have a hive table with columns -> date, hr, count where date, hr are partitions. I want to query the table for 4 hours summarized data considering i have data and time in hand.
Example -> If i have date as 2012-02-08 and hr as 02 then the summarized report should contain be summarized count of 2012-02-07,23|2012-02-08,00|2012-02-08,01|2012-02-08,02
I would like to know is there a way to query in one shot.
Thank you
Why not do a group by where you group by date and hr:
Also have has some extra date and time functions that might be useful like hour(datetime) or minute, day.