87

Transaction Balance Validation

HardCASECOALESCELEFT JOIN

Problem Description

Write a SQL query to verify account balances by calculating credits minus debits.

Expected Columns

  • holder_name
  • current_balance
  • calculated_balance
  • difference

Example Output

| holder_name | current_balance | calculated_balance | difference | |-------------|-----------------|--------------------| -----------| | Vijay Anand | 125000.5 | 30000 | 95000.5 | | ... | ... | ... | ... |

Hints

Unlocks after 2 more attempts
Submit your solution to unlock hints

Related Topics

CASECOALESCELEFT JOINaggregation
//#87 Transaction Balance Validation
Hard

Loading schema...

Loading editor...

No results yet

Run a query to see results