Finance Path · Mission 7 of 25Easy

Top 10 vendors by YTD spend

GROUP BY + ORDER BY + LIMIT

Back to Finance

The Brief

Daniel OkaforControlleraccounting

AP renewal season. I need the top 10 vendors by 2025 YTD spend — show `vendor_name` and `total_spend`, sorted highest to lowest, limit 10. Only posted entries. Include all account types.

You'll practice

GROUP BYORDER BYLIMIT

Tables available

fact_transactionsdim_vendors

Hints (3)

Each hint you reveal reduces the XP you can earn. Try the query first.

Hint 1

JOIN `fact_transactions` to `dim_vendors`, filter `posted = 1` and year 2025.

Hint 2

GROUP BY vendor_name (or vendor_id), SUM(amount) AS total_spend, ORDER BY total_spend DESC, LIMIT 10.

Hint 3

Remember the trailing-space Stripe — if your LOWER(TRIM(...)) collapsed them, that's fine; if not, you'll see both. Either output is acceptable.