001Level 1

Chapter 3 · Sorting & Limiting

09. Closed Accounts with Remaining Balance

Easy10 XPFinance

The operations team needs to identify closed accounts that still have a positive balance, which may indicate an error. Return the account id, customer_id, account_type, balance, and status. Sort by balance descending.

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.

Peek at the solution?

You can still earn the XP afterwards by submitting a working query — but you'll learn more if you give it one more try.