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

Instruction

Good job! Let's do a similar exercise.

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 active_customers. Order the rows by year and quarter.

Stuck? Here's a hint!

Use the following WHERE clause:

WHERE CURRENT_DATE - last_order_date < INTERVAL '14' day