Pergunta de entrevista da empresa Walmart

SQL group by and having case questions