PrepZone Logo
PrepZone
Back to Database

Database · Hard

Split monthly orders into new vs returning customers.

DatabaseSQL QueriesStaffWindow Functions

Answer preview

Compute each customer's first order date once, join it back to every order, then split the monthly counts with FILTER on is this order their first?.…