RienSQL
TASK #217 · Easy · BBVA

Card Spending by Category in March

Your brief
BBVA stores card payments in card_payments: the payment date and time paid_at, the spending category and the amount in euros.

Write a query that, for each category with card payments in March 2025, returns category, the number of those payments payments and their total total_spent. Sort the result by total_spent in descending order.
Expected columnscategory payments total_spentBBVA
SQL editor
SQLite
Ctrl / ⌘ + ↵
Result

Write a query and run it to see the results.

Schema
customerscustomer_id, full_name, city, joined_date
accountsaccount_id, customer_id, product, opened_date, start_balance
card_paymentspayment_id, account_id, paid_at, merchant, category, amount
transferstransfer_id, from_account_id, to_account_id, transfer_at, amount, concept