Domanda di colloquio di TCS

SQL question based on aggregate function and groupby