Amazon Interview Question

Some difficult advanced sql questions