TikTok Interview Question

SQL with a window function