Skip to main content

SQL aggregation · 5 minutes

Count rows before summing a receipt

Get feedback on your answer. No account needed.

A receipt has three sale lines and two refunds. A query joins both detail tables to the receipt using only receipt_id. How many joined rows represent this receipt?

Your answer
Need a small hint?

Each sale line can match each refund.

This helps us choose when to schedule your next review.