Chapter 3 · Sorting & Limiting
08. Ten Most Recent Transactions
Easy10 XPFinance
The fraud monitoring dashboard needs to show the ten most recent transactions. Return the id, account_id, transaction_date, type, and amount, sorted with the newest transactions first (for transactions on the same date, the higher id first).
Tables
- PKidINT
- FKaccount_id→ accounts.idINT
- transaction_dateTEXT
- typeTEXT
- amountREAL
- balance_afterREAL
- descriptionTEXT
- reference_numberTEXT
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.