Management & CommerceHardMBA placement (Analytics)
Table a(cust) has rows Asha, Ravi, Meena, Ravi and table b(cust) has rows Ravi, Kiran. How many rows does SELECT cust FROM a EXCEPT SELECT cust FROM b return?
- A. 3
- B. 1
- C. 4
- D. 2
Correct answer: D. 2
EXCEPT returns distinct rows of the first query that are absent from the second: Asha and Meena. Both copies of Ravi are removed, and EXCEPT (like UNION) removes duplicates, so the result has 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
- 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…
- 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…