Amazon Interview Question

SQL questions using window functions.