Skimlinks interview question

sql manipulation using joins, group by, having