How to solve SQL queries

join shbcf.ru