Management & CommerceVery hardMBA placement (Analytics)
orders(oid, amt) has (1, 100) and (2, 200); payments(oid, paid) has (1, 60), (1, 40) and (2, 200). An analyst runs SELECT SUM(o.amt) FROM orders o JOIN payments p ON o.oid = p.oid to get total order value. What does it return?
- A. 300
- B. 500
- C. 400
- D. 600
Correct answer: C. 400
Order 1 matches two payment rows, so the join repeats its ₹100 and the sum is 100 + 100 + 200 = 400, overstating the true total of 300. Aggregate payments per order first (or sum orders without the join) to avoid this fan-out.
Practise more Operations, Supply Chain & Business Analytics questionsOperations, Supply Chain & Business Analytics: notes and key points
More Operations, Supply Chain & Business Analytics questions
- A pump has a constant failure rate of 0.001 per hour. A second identical pump is kept as a cold standby with a perfect switch. What is the…
- An assembly line with a cycle time of 10 minutes has four stations with loads of 9, 10, 8 and 7 minutes. What is its smoothness index?
- A pilot work-sampling study suggests machines are idle 20% of the time. How many random observations are needed to estimate the idle share…
- A time study records an average observed time of 2.0 minutes for an element, the operator is rated at 110%, and allowances are 15% of…
- Daily demand for a spare part is 0, 1, 2 or 3 units with probabilities 0.1, 0.3, 0.4 and 0.2. What are the mean and variance of daily…
- Urgent IT tickets arrive at an average of 3 an hour (Poisson). What is the probability that more than 2 tickets arrive in a 30-minute…