Infosys Interview Question

4.) SQL query (related to group by and having)