Management & CommerceHardCAT · XAT
Table customers has rows (1, Asha), (2, Bala), (3, Chitra), (4, Dev). Table orders(cust_id, amt) has (1, 100), (1, 200), (2, 50), (5, 70). The query SELECT COUNT(*) FROM customers c LEFT JOIN orders o ON c.id = o.cust_id returns
- A. 4
- B. 5
- C. 3
- D. 6
Correct answer: B. 5
Asha matches 2 orders, Bala 1, and Chitra and Dev appear once each with NULLs: 2 + 1 + 1 + 1 = 5. The order for customer 5 has no customer row, so it is dropped by a left join.
Practise more Operations, Supply Chain & Business Analytics questionsOperations, Supply Chain & Business Analytics: notes and key points
More Operations, Supply Chain & Business Analytics questions
- Maximise 30x + 20y subject to x + y ≤ 40 (labour hours), 2x + y ≤ 60 (material) and x, y ≥ 0. The shadow price of one extra unit of labour…
- Payoffs (₹ lakh): Alternative A gives 100 in state 1 and 40 in state 2; Alternative B gives 60 and 70. State probabilities are 0.4 and…
- An item has a gross requirement of 200 units in week 6, with 50 on hand, no scheduled receipts, a lead time of 2 weeks, and a lot size…
- The first unit of a job takes 100 hours and the cumulative average time follows an 80% learning curve. Total hours for units 5 to 8…
- A regression with n = 30 observations and k = 4 predictors has R² = 0.80. The adjusted R² is
- A service has two servers, each serving 20 customers an hour (M/M/2), and arrivals of 30 an hour. The average number of customers waiting…