Hopscotch (India) interview question

SQL query using group by Statement.