Management & CommerceEasyBusiness 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). What does SELECT COUNT(*) FROM orders WHERE region = 'North'; return?

  1. A. 2
  2. B. 7
  3. C. 3
  4. D. 4

Correct answer: C. 3

WHERE keeps only the North rows (orders 1, 3 and 6) and COUNT(*) counts rows, so the answer is 3. 7 ignores the filter, and 2 is the number of distinct North customers (Asha, John), which would need COUNT(DISTINCT customer).

More Operations, Supply Chain & Business Analytics questions

Exams that ask this topic