001Level 1

Chapter 3 · Sorting & Limiting

11. List All Expired Cards

Easy10 XPFinance

The compliance department needs a report of all cards that have expired. Return card id, account_id, card_number, card_type, and expiry_date for cards where the status is 'expired'. Sort by expiry_date ascending.

Tables

  • PKidINT
  • FKaccount_id→ accounts.idINT
  • card_numberTEXT
  • card_typeTEXT
  • expiry_dateTEXT
  • statusTEXT
  • credit_limitREAL
  • issued_atTEXT

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.