EXL Service Interview Question

SQL: lag/lead based queries + window functions