Query by Time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I thought this was going to be an easy one...I need a query that provides a
count of the number of requests taken per hour and the total number of
requests for the day.

Requests between 7:00 AM and 8:00 AM = 50
Requests between 8:00 AM and 9:00 AM = 75
Requests between 9:00 AM and 10:00 AM = 82

Total Requests for the day = 207

My time field format is Med Time. Any suggestions? Thanks
 
K said:
I thought this was going to be an easy one...I need a query that provides a
count of the number of requests taken per hour and the total number of
requests for the day.

Requests between 7:00 AM and 8:00 AM = 50
Requests between 8:00 AM and 9:00 AM = 75
Requests between 9:00 AM and 10:00 AM = 82

Total Requests for the day = 207


SELECT Hour(R.datetimefield) As RequestHour.
Count(*) As NumberOfRequests
FROM sometable
GROUP BY Hour(R.datetimefield)
WHERE DateValue(datetimefield) = [Enter Date]
 
Back
Top