Skip to content
SQLSimplified
mediumstorejoingroup-by

Orders Per Customer

Problem

Write a query that returns each customer's name and the number of orders they've placed (aliased as order_count), including only customers who have placed at least one order. Order the results by order_count from highest to lowest.

Try It

Loading playground environment...

Hint

Solution

Next Problem