Infosys interview question

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