The interview answer is syntax. The production answer is choosing the correct partition, order, and frame so the result stays stable. That is how a 200-line self-join turns into 20 lines of SQL people ...