with follow_tb as(
select
follower_id user_id
from
follow
where user_id = 1)
, music_tb as(
select
music_id id
from
music_likes
where music_id not in (
select
music_id
from music_likes
where user_id = 1
) and user_id in (select user_id from follow_tb))
select
music_name
from music
where id in (select id from music_tb)
order by id

京公网安备 11010502036488号