Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Distribution of Orders per Customer

Return how many customers placed exactly 1 order, exactly 2 orders, and so on: order_count and customers, ordered by order_count.

Table schema

Orders(id INT PRIMARY KEY, customer VARCHAR(10))

Sample data

id | customer
1 | Ann
2 | Ann
3 | Bob
4 | Cy
5 | Dee
6 | Dee
7 | Dee

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.