SQL aggregation · 5 minutes
Group independent totals at the right level
Get feedback on your answer. No account needed.
A receipt can contain multiple currencies. The report needs one row per receipt and currency. Both sales and refunds carry these keys. How should the two summaries be built and matched?
