Duplicate Revenue from Joining Orders to Multiple Payments and Refunds
Return one row per order with paid_amount, refunded_amount, and net_revenue. Aggregate each child table to order_id before joining so payment and refund rows cannot multiply each other.
In progress
Your attempt
Explain and fix the mismatch
Write the corrected query, then run it against the visible source and target data.