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

bookChallenge: Detect Duplicate Transactions

Tâche

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.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 4. Chapitre 2
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

Suggested prompts:

Can you explain this in simpler terms?

What are the main points I should remember?

Can you give me an example?

close

bookChallenge: Detect Duplicate Transactions

Glissez pour afficher le menu

Tâche

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.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 4. Chapitre 2
single

single

some-alt