CommerceIQ interview question

SQL questions on joins groupby and subquerries