with a as (select distinct id ,music_name from follow t join music_likes t1 on t.follower_id=t1.user_id join music t2 on t1.music_id=t2.id where t.user_id=1 and music_name not in (select music_name from music_likes t join music t1 on t.music_id=t1.id where t.user_id=1 ) order by id) select music_name from a



京公网安备 11010502036488号