Sogeti Interview Question

Sql questions about group by and having clause