Infosys Interview Question

Asked me to write a sql query for group by and having clause.