Finance Path · Mission 4 of 25Starter

How much did we spend on SaaS in 2025?

SUM with WHERE filter across a JOIN

Back to Finance

The Brief

Sam PatelTreasury Analysttreasury

Quick one for the cash forecast — total SaaS vendor spend YTD 2025. Join `fact_transactions` to `dim_vendors` on vendor_id where category is 'SaaS'. Only posted entries. One number, call the column `total_saas_spend`.

You'll practice

SUMWHEREDate filter

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` t to `dim_vendors` v on `t.vendor_id = v.id`. Wait — the column in `dim_vendors` is `vendor_id`.

Hint 2

Filter: `v.category = 'SaaS'`, `t.posted = 1`, and year = 2025 using `EXTRACT(YEAR FROM t.txn_date::date) = 2025`.

Hint 3

`SELECT SUM(t.amount) AS total_saas_spend ...` — one row, one column.