For completed charges dated in June 2026, return partner_id and net_payout = the partner's total charge_amount minus the refunds issued on or before 2026-06-30. A charge can have more than one refund: each charge amount counts once, and each refund issued on or before the cutoff is subtracted once. Include partners with no refunds and order by partner_id.
The database is already loaded with the schema and seed data. You are given partner_payouts.sql (a query that runs but returns the wrong answer). Fix partner_payouts.sql so it returns the correct result.