Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
select users.* from (select friend_id from friends where user_id = 7) as t1 join (select friend_id from friends where user_id = 25) as t2 on t1.friend_id = t2.friend_id join users on users.id = t1.friend_id