セクション 4. 章 2
single
Challenge: Detect Duplicate Transactions
メニューを表示するにはスワイプしてください
タスク
スワイプしてコーディングを開始
Write an SQL query to identify accounts where the recorded balance in the balances table does not match the sum of all their transactions in the bank_transactions table. This helps ensure that account balances reflect the actual transaction history.
- Calculate the net transaction sum for each account by summing deposits and subtracting withdrawals from the
bank_transactionstable. - Compare this calculated sum to the balance recorded in the balances table for each account.
- Return the
account_id, the recordedbalance, and the calculated transaction sum for any account where these values do not match.
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 4. 章 2
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください