Challenge: Reconcile Account Balances
Compito
Swipe to start coding
Write a SQL query to identify accounts in the balances table where the sum of related transactions in the bank_transactions table does not match the recorded balance.
- For each account in the
balancestable, calculate the sum of all deposits minus all withdrawals from thebank_transactionstable. - Compare this sum to the value in the
balancecolumn of thebalancestable. - Select the
account_idfor accounts where the calculated sum does not equal the recorded balance.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 4. Capitolo 4
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Fantastico!
Completion tasso migliorato a 4.55
Challenge: Reconcile Account Balances
Scorri per mostrare il menu
Compito
Swipe to start coding
Write a SQL query to identify accounts in the balances table where the sum of related transactions in the bank_transactions table does not match the recorded balance.
- For each account in the
balancestable, calculate the sum of all deposits minus all withdrawals from thebank_transactionstable. - Compare this sum to the value in the
balancecolumn of thebalancestable. - Select the
account_idfor accounts where the calculated sum does not equal the recorded balance.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 4. Capitolo 4
single