You need to get each user's most recent order, and some users have several orders with the same timestamp. How would you write the query, and which function would you choose?
~4 min by voice
How to approach it
This checks whether the candidate knows window functions and understands how ROW_NUMBER, RANK and DENSE_RANK behave on tied values. It also matters whether they can make the result deterministic and filter on the window correctly.
The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.