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

Customer Segment Labels

Label customers: 'VIP' if they have at least 2 orders and spent at least 300, 'Regular' if they have at least 2 orders otherwise, and 'One-time' for the rest. Order by customer.

Table schema

Orders(id INT PRIMARY KEY, customer VARCHAR(10), order_date DATE, amount INT)

Sample data

id | customer | order_date | amount
1 | Ann | 2026-06-20 | 200
2 | Ann | 2026-06-01 | 150
3 | Bob | 2026-05-01 | 90
4 | Cy | 2026-06-28 | 120
5 | Cy | 2026-06-10 | 60
6 | Cy | 2026-04-01 | 40

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.