Mysql
 sql >> Database >  >> RDS >> Mysql

Un modo per unire queste due query senza subquery?

SELECT GROUP_CONCAT(l2.friend_id) AS friends
FROM friends_friends l1
  JOIN friends_friends l2
    ON l2.user_id = l1.friend_id
WHERE l1.user_id = 503695576;