Skip to main content
All Problems
medium0% acceptance

Number of Cards Per Customer

The card operations team wants to know how many cards each customer has. Return first_name, last_name, and card_count. Include customers with zero cards. Sort by card_count descending, then last_name.

Schema

🔑idINT
first_nameTEXT
last_nameTEXT
emailTEXT
phoneTEXTNULL
date_of_birthTEXT
cityTEXT
stateTEXT
countryTEXT
created_atTIMESTAMP
postgresql

Run your query to see results

Press Ctrl + Enter to execute