Manhattan Associates Interview Question

SQL queries based on join.