Pregunta de entrevista de Publicis Sapient

A group by based SQL query