EXL Service interview question

SQL: lag/lead based queries + window functions