Pregunta de entrevista de Cognizant

How does GROUP BY work?