Pregunta de entrevista de TCS

SQL question based on aggregate function and groupby