Routine~12min
The Orphan Payment
The gateway collected payment for 16 orders that don't exist in the orders table. Payment went through — money was charged — but the order creation step failed right after. ₹35,464 is stranded with no fulfilment record attached. Five other payments have no order_id at all: those are gift card top-ups, which legitimately have none.
Tables you'll query
orderspayments
What you'll learn
JOINsAggregations & GROUP BY