How can I adjust my SQL query to handle multiple rows in a subquery

join shbcf.ru