Pergunta de entrevista da empresa InfoCepts

Question on SQL using ground by and having