Management & CommerceHardBusiness analyst · KPO · MBA placement pattern

Table monthly(m, mon, rev) holds Jan 200, Feb 240, Mar 210, Apr 260 (m = 1–4). A query computes ROUND(100.0 * (rev − LAG(rev) OVER (ORDER BY m)) / LAG(rev) OVER (ORDER BY m), 1). Which month shows the highest value, and what does January show?

  1. A. February (20.0); January shows 0
  2. B. April (23.8); January shows 0
  3. C. April (19.2); January shows NULL
  4. D. April (23.8); January shows NULL

Correct answer: D. April (23.8); January shows NULL

LAG has no earlier row for January, so it returns NULL and the whole expression is NULL. Growth: Feb 40/200 = 20.0, Mar −30/240 = −12.5, Apr 50/210 ≈ 23.8. Dividing by the current month (50/260) gives 19.2.

More Operations, Supply Chain & Business Analytics questions

Exams that ask this topic