Pregunta de entrevista de Walmart

SQL group by and having case questions