PrepZone Logo
PrepZone
Back to Database

Database · Medium

Find customers who placed more than N orders (HAVING practice).

DatabaseSQL QueriesSenior

Answer preview

Group the lines by order and filter on the group with HAVING — WHERE cannot see COUNT(*) because it runs before aggregation.…