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

Store (Customers/Orders/Products)

Loading database engine...

Hint

Solution

Search

Search lessons, functions, examples, and practice problems