Chapter 9 · Interview Level
08. Customer Count by State
Easy10 XPE-Commerce
The expansion team wants to see customer distribution across states. Return each state and the number of customers in that state, but only include states that have at least 2 customers. Sort by customer count descending.
Tables
- PKidINT
- first_nameTEXT
- last_nameTEXT
- emailTEXT
- phoneTEXT
- cityTEXT
- stateTEXT
- countryTEXT
- created_atTIMESTAMP
Need help?
Ask Sol
AI tutor — looks at your current query and nudges you, without spoiling the answer.
Solution
Try the hints first — solving it yourself is what makes it stick.