Client 29 shopping spend by week, from August 18, 2025
Instructions
Build a series of 12 consecutive weeks, the first starting on Monday, August 18, 2025 and the last on Monday, November 3, 2025; a week is 7 days from Monday to Sunday inclusive. For each week, count the transactions of the category 'shopping' across all accounts of the client with client_id = 29: tx_cnt (their number) and spent (the sum of absolute values of amount; all transactions of this category are debits with a negative amount). Output weeks without such transactions with tx_cnt = 0 and spent = 0. Output week_start (type date), tx_cnt, spent. Sort by week_start ascending.
Hints
Each next one is more detailed and costs more
Query
Result
Click Run to see the query result, or Check to submit your solution.
Dataset schema
Table relationships
- N:1Many-to-one
accounts.→client_id clients.id - N:1Many-to-one
transactions.→account_id accounts.id
Table data
Select a table in the diagram or list to view its rows.