I want to retrieve total number of web activities for each hour interval.
I am hoping to get this output
Today
hour(EST) Number of Web Activities
12am-1am
1am-2m
....
11pm -12pm
How to I write the query
Printable View
I want to retrieve total number of web activities for each hour interval.
I am hoping to get this output
Today
hour(EST) Number of Web Activities
12am-1am
1am-2m
....
11pm -12pm
How to I write the query
select count(*) from tablename where date_time>='' or date_time<=''
You can do this like so:
select hour(date_time) as hour, count(*) from test where date(date_time) = date(now()) group by hour(date_time);
Bert