Here's a simple one :-)
I have a table with (simplified) these fields:
DateTime, PhoneNumber, Duration.
I want to find
(A) a phone number that was called 5 times during a datetime interval (let's say, between '2004-09-20 08:00:00' and '2004-09-25 20:00:00' , and know the DateTime value for that. What's the SQL statement I should use?
(B) the same as (A), but I want to narrow down the datetime interval per day. For example, the first day between 1pm and 1:30 pm, the second day between 9:15 am and 9:35 am, etc.
I'm not a SQL expert, so please be precise and complete in your syntax.