Globe Publication interview question

Sql query using join and group by