001Level 1

Chapter 3 · Sorting & Limiting

07. Accounts by Type

Easy10 XPFinance

The product team wants to see all checking and savings accounts. Return the id, customer_id, account_type, and balance for accounts whose type is either 'checking' or 'savings', ordered 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.