Pregunta de entrevista de Mastek

SQL query about group by, aggregate functions and having clause