Skip to main content
All Problems
medium0% acceptance

Customer Total Balance with Branch Info

Create a report showing each customer's total account balance alongside their local branch info. Join customers to accounts (summing balance) and to branches (on city). Return first_name, last_name, city, branch name, and total_balance. Sort by total_balance descending. Limit to 25.

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