Tell me about the most difficult questions you faced in the SQL round, especially those involving window functions.
For this exercise, write a PostgreSQL query that demonstrates this type of analysis using the provided account transaction data. Include only posted transactions from the first quarter of 2025.
Output
- One row per included transaction, with
account_id, transaction_id, transaction_date, amount, prior_amount, running_balance, and three_transaction_average
prior_amount is the previous posted transaction amount for that account; cumulative and average values are calculated chronologically
- Order by
account_id, transaction_date, and transaction_id