How do you validate the accuracy of your outputs when working with complex financial datasets at Stripe?
Using the provided Stripe financial records, write a SQL query that compares transaction activity with ledger activity for each reporting period and currency. Identify periods where counts or totals do not reconcile.
Output
- One row per reporting period and currency
- Columns:
period_start, currency, transaction_count, ledger_entry_count, transaction_total, ledger_total, amount_difference, and validation_status
- Include periods with activity on only one side, order by
period_start, then currency