一步一步地进行嵌套, 1.查出自己喜欢的音乐id

2.查出自己关注的人

3.查出自己关注的人喜欢的音乐id

4.喜欢的音乐id不能包含自己在内

5.根据id查出名字

select mu.music_name from music mu,

(select distinct(s.music_id) mid from#查出自己关注的人喜欢的音乐

music_likes s,

(select distinct(f.follower_id) fid from#查询出自己关注的人

follow f where

f.user_id=1) b where

s.user_id=b.fid) c where

mu.id=c.mid and

mu.id not in(#查询出自己喜欢的音乐id

select m.music_id from music_likes m where

m.user_id=1) order by mu.id