Infosys interview question

They ask me the SQL Query on the Windows CTE and Subquery.