1/31
Looks like no tags are added yet.
What is an inner join?
Keeps rows that have matching records in both tables.
What did you find challenging? How did you address?
Orders, shipments and refunds were recorded at different levels. One order could contain multiple shipments or refund records, so joining the datasets directly could multiply rows and potentially lead to double-counting.
I addressed this differently depending on the question. For refund rates in Q5, I used a LEFT JOIN to retain orders without refunds and COUNT DISTINCT to count each order once.
For Q7, I used EXISTS to check whether an order had any refund without multiplying the shipment records.
And in Q8, I used CTEs to first aggregate refunds by order, calculate net revenue at the order level, and then distribute that across the associated parcels.
The key was ensuring the level of aggregation matched what each question was asking.
What is a left join?
Left join retains all rows from the left table, including those without a match
A courier's returned-and-refunded rate rises from 2% to 3%. How big is the change?
The increase is 1 percentage point, equivalent to a 50% relative increase. I'd check sample size, mix, and the cost associated with returns before assessing the commercial impact.
Carrier A costs £3.00 per parcel and has a 5% failure rate. Carrier B costs £3.30 and has a 2% failure rate. Each failure costs £15. Which is cheaper overall?
Expected cost per parcel for A is £3.00 + 0.05 × £15 = £3.75. For B it is £3.30 + 0.02 × £15 = £3.60. B is cheaper by £0.15 per parcel on these assumptions, despite its higher upfront charge.
The interviewer gives you ambiguous numerical data. What should you do first?
Clarify the objective, denominator, definitions, and assumptions before calculating. Then structure the problem, make the arithmetic transparent, sanity-check the result, and give a recommendation with a clear caveat where uncertainty remains.