This website uses cookies to ensure you get the best experience.
Learn more.
A table contains multiple transactions for each account. The analyst needs one row per account with the total transaction amount. Which query pattern is appropriate?
Published
- SELECT SUM(amount) FROM transactions
- SELECT DISTINCT account_id, amount FROM transactions
- SELECT account_id, SUM(amount) FROM transactions GROUP BY account_id
- SELECT account_id, amount FROM transactions
Comments — 0
Sign in to comment