Management wants to know how many customer accounts exist in each branch city. Since accounts are linked to customers and customers have a city, count the number of accounts grouped by the customer's city. Return city and account_count, ordered by account_count descending.
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