Piramal Enterprises Interview Question

Sql query using group by clause