Count Orders Per Customer

Easy
group-by Netflix Spotify DoorDash

Write a query to count the number of orders each customer has placed. Return customer_id and order_count, ordered by order_count DESC, then customer_id.

Expected Output: Each customer with their total number of orders.

Tables

Hints (2 available)

SQL Editor

Output

Click "Run" to see results...