Alerzo interview question

SQL window functions, Use of subqueries