I\'m trying to do a query that fetches data per hour but instead of the normal group by hour I want to narrow it down and only get the latest hour
hour
latest
I use this solution
select date(PROCESS_DATE),hour(PROCESS_DATE),EVENT,COUNT(*) from statistics group by EVENT,date(PROCESS_DATE),time(PROCESS_TIME) order by 1 desc, 2 desc limit 1;
Hope this assists someone.