My DB looks like this and represents a purchase made by a customer at a certain store:
Customer ID | Store ID | Date & Time
1 | 1884 | 2016-10-30 13:00:00
5 | 2001 | 2016-10-30 13:00:00
The dataset is very large. Time is spaced by 1 hours.
I need to count how many customers made a purchase during each hour of the day. Returned data should look like this:
Store ID | Unique Date & Time | Number of purchases
1884 | 2016-10-30 13:00:00 | 8
1884 | 2016-10-30 14:00:00 | 12
I am out of ideas and would appreciate any help I can get.