Testing interview question

how to do CTE and window functions in SQL