Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Challenge: Detect Duplicate Transactions | Data Accuracy, Reconciliation, and Transaction Logic
SQL for Finance and Accounting

bookChallenge: Detect Duplicate Transactions

Aufgabe

Swipe to start coding

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_transactions table.
  • Compare this calculated sum to the balance recorded in the balances table for each account.
  • Return the account_id, the recorded balance, and the calculated transaction sum for any account where these values do not match.

Lösung

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 4. Kapitel 2
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

close

bookChallenge: Detect Duplicate Transactions

Swipe um das Menü anzuzeigen

Aufgabe

Swipe to start coding

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_transactions table.
  • Compare this calculated sum to the balance recorded in the balances table for each account.
  • Return the account_id, the recorded balance, and the calculated transaction sum for any account where these values do not match.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 4. Kapitel 2
single

single

some-alt