Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Customer activity
6. Number of active customers in time-period cohorts – exercise
Finding good customers


Good job! Let's do a similar exercise.


Find the number of active customers in quarterly registration cohorts. Active customers are customers who've made a purchase in the last 14 days. Show three columns: Year, Quarter, and ActiveCustomers. Order the rows by year and quarter.

Stuck? Here's a hint!

Use the following WHERE clause:

WHERE DATEDIFF(Day, LastOrderDate, GETDATE()) < 14