← Sales & Refund Reconciliation My saved work →
Independent practice · SQLite
Find conflicting refund keys
Practice dataset
Your work
Active 0:00 · Paused 0sKeep a handoff you can replay
Check your current answer, then download the output and its report. The report includes the source, answer and each check so you can review what passed and what needs work.
To replay your work, open this task with the same dataset, import your answer and check it again.
Show the reference answer
SELECT refund_id FROM refunds GROUP BY refund_id HAVING MIN(order_id)<>MAX(order_id) OR MIN(amount)<>MAX(amount) OR MIN(status)<>MAX(status) OR MIN(booked_at)<>MAX(booked_at) ORDER BY refund_id
COUNT(*) > 1 confuses harmless repeats with conflicting facts. Compare the values within each key.