# Database Discussions > MySQL >  Need help with query

## AmyJoe

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

----------


## Civic1986

select count(*) from tablename where date_time>='' or date_time<=''

----------


## b_pereira

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

----------

