-
Need help with query
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<=''
-
Count by hour
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|