zypmedia interview question

SQL question using join function