TASK #217 · Easy · BBVACard 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.
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.
Ctrl / ⌘ + ↵
Result
Write a query and run it to see the results.
Schema
customerscustomer_id, full_name, city, joined_dateaccountsaccount_id, customer_id, product, opened_date, start_balancecard_paymentspayment_id, account_id, paid_at, merchant, category, amounttransferstransfer_id, from_account_id, to_account_id, transfer_at, amount, concept