SELECT `ul`.`user_id`, `ul`.`name`, `ul`.`uid`, `ul`.`gender`
FROM `users_list` AS `ul`
JOIN `users_groups` AS `ug` ON `ul`.`user_id` = `ug`.`user_id`
JOIN `groups_list` AS `gl` ON `gl`.`group_id` = `ug`.`user_id`
WHERE `gl`.`uid` = :gid;
SELECT t1.*
FROM users_list
WHERE EXISTS(
SELECT t2.id
FROM users_groups t2
WHERE t2.user_id = t1.id AND FIND_IN_SET(t2.id, '1,2,3,4,и другие id групп через ,')
)