Management & CommerceModerateNMAT · SNAP
A table orders(id, cust, amt) has rows (1, A, 200), (2, B, 300), (3, A, 350), (4, C, 600), (5, B, 150), (6, A, 100). The query SELECT cust, SUM(amt) FROM orders GROUP BY cust HAVING SUM(amt) > 500 returns how many rows?
- A. 2
- B. 1
- C. 3
- D. 4
Correct answer: A. 2
Totals are A = 650, B = 450 and C = 600. HAVING filters groups, so A and C remain: 2 rows.
Practise more Operations, Supply Chain & Business Analytics questionsOperations, Supply Chain & Business Analytics: notes and key points
More Operations, Supply Chain & Business Analytics questions
- A single-server queue has arrivals of 12 an hour and a service rate of 15 an hour (M/M/1). The average time a customer waits before…
- A newsvendor buys at ₹40 and sells at ₹100, with a salvage value of ₹10 for unsold units. Demand is uniform between 200 and 500. The…
- Activities (days; predecessors): A 4 (–), B 6 (–), C 5 (A), D 7 (A, B), E 3 (C, D), F 4 (D). The slack of activity C is
- Exponential smoothing with α = 0.4 has an initial forecast of 100 for period 1. Actual demand is 110 in period 1 and 120 in period 2. The…
- A process has specification limits of 40 and 60, a mean of 52 and a standard deviation of 2.5. Cpk is closest to
- Sources S1 and S2 have supplies of 40 and 30 and destinations D1, D2 and D3 have demands of 20, 25 and 25. Unit costs are S1: 4, 6, 8; S2…