Management & CommerceHardBusiness analyst · SQL test
Customers: Asha (1), Ravi (2), Meena (3). Orders (cid, amt): (1, 300), (1, 700), (2, 450), (3, 520), (3, 100). Which names does SELECT name FROM c WHERE EXISTS (SELECT 1 FROM o WHERE o.cid = c.id AND o.amt > 500) return?
- A. Asha only
- B. Asha, Ravi and Meena
- C. Asha and Meena
- D. Meena only
Correct answer: C. Asha and Meena
EXISTS is true for a customer with at least one order above 500: Asha (700) and Meena (520). Ravi's only order is 450. Each customer appears once even if several orders qualify.
Practise more Operations, Supply Chain & Business Analytics questionsOperations, Supply Chain & Business Analytics: notes and key points
More Operations, Supply Chain & Business Analytics questions
- Table r(region, rev) has N 200, S 300, E 500. What does ROUND(100.0 rev / SUM(rev) OVER (), 1) return for region S?
- A January cohort of 1,000 sign-ups has 600 active users in month 1 and 450 in month 2. An analyst reports 'month-2 retention of 75%'. What…
- A retailer buys a seasonal item at ₹60 and sells it at ₹100; unsold units are cleared at ₹20. Each unit of unmet demand also costs an…
- A machine runs batches of 100 units at 1 minute per unit. A SMED project cuts the changeover from 60 to 20 minutes, and the batch size is…
- A single-server help desk (M/M/1) receives 8 requests an hour and serves 10 an hour. If the server's speed is doubled to 20 an hour, what…
- A contact centre receives 120 calls an hour, and calls last 3 minutes on average. What is the offered traffic load in Erlangs, and what…