Customer table with purchases in a date range
Having some challenge doing this.
- Select all customers that made more than 2 purchases in an hour starting from a given datetime eg.2016-01-01.13:00:00
Select all customers that made more than 2 purchases in a a day(24 hours) starting from a given datetime eg. 2016-01-01.15:30:05
Select count(name) from cust_table where count(name) IN (BETWEEN (2016-01-01.13:00:00, 2016-01-01.14:00:00))