Management & CommerceVery hardBusiness analyst · KPO · MBA placement pattern
Table orders(order_id, customer, region, amount) has 7 rows: (1, Asha, North, 500); (2, Ravi, South, 300); (3, Asha, North, 200); (4, Meena, East, NULL); (5, Ravi, South, 700); (6, John, North, 400); (7, Meena, East, 350). Which orders does SELECT order_id FROM orders WHERE amount IS NOT NULL ORDER BY amount DESC LIMIT 2 OFFSET 1; return?
- A. Orders 5 and 1
- B. Orders 1, 6 and 7
- C. Orders 6 and 7
- D. Orders 1 and 6
Correct answer: D. Orders 1 and 6
Sorted by amount, highest first: 5 (700), 1 (500), 6 (400), 7 (350), 2 (300), 3 (200). OFFSET 1 skips order 5, and LIMIT 2 returns the next two: orders 1 and 6.
Practise more Operations, Supply Chain & Business Analytics questionsOperations, Supply Chain & Business Analytics: notes and key points
More Operations, Supply Chain & Business Analytics questions
- Table orders(orderid, customer, region, amount) has 7 rows: (1, Asha, North, 500); (2, Ravi, South, 300); (3, Asha, North, 200); (4…
- Table orders(orderid, customer, region, amount) has 7 rows: (1, Asha, North, 500); (2, Ravi, South, 300); (3, Asha, North, 200); (4…
- A consumer-electronics firm's quarterly figures (₹ crore unless stated), Q1 to Q4: revenue 240, 270, 300, 330; cost of goods sold 150…
- A consumer-electronics firm's quarterly figures (₹ crore unless stated), Q1 to Q4: revenue 240, 270, 300, 330; cost of goods sold 150…
- A consumer-electronics firm's quarterly figures (₹ crore unless stated), Q1 to Q4: revenue 240, 270, 300, 330; cost of goods sold 150…
- A consumer-electronics firm's quarterly figures (₹ crore unless stated), Q1 to Q4: revenue 240, 270, 300, 330; cost of goods sold 150…