Pregunta de entrevista de NITS

Sql question related to windows Function and the difference between CTE and Subquery