Management & CommerceVery hardBusiness analyst · SQL test

A table has 10 rows with x = 1 to 10. NTILE(4) OVER (ORDER BY x) splits them into quartile buckets. How many rows fall into buckets 1, 2, 3 and 4?

  1. A. 2, 2, 3, 3
  2. B. 2.5 each
  3. C. 3, 2, 3, 2
  4. D. 3, 3, 2, 2

Correct answer: D. 3, 3, 2, 2

NTILE divides 10 rows into 4 groups as evenly as possible; the 2 leftover rows go to the first groups, so the sizes are 3, 3, 2, 2 (x = 1–3, 4–6, 7–8, 9–10).

More Operations, Supply Chain & Business Analytics questions

Exams that ask this topic