Chapter 3 · Sorting & Limiting
18. Overdrawn Accounts
Easy10 XPFinance
The risk team needs to identify all overdrawn accounts. Return the id, customer_id, account_type, and balance for every account where the balance is less than 0. Order by balance ascending (most overdrawn first).
Tables
- PKidINT
- FKcustomer_id→ customers.idINT
- account_typeTEXT
- balanceREAL
- currencyTEXT
- opened_atTEXT
- statusTEXT
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.