题解 | #网易云音乐推荐(网易校招笔试真题)#

网易云音乐推荐(网易校招笔试真题)

http://www.nowcoder.com/practice/048ed413ac0e4cf4a774b906fc87e0e7

这一定是好理解的,也是失败的代码,运行巨大,称呼我为后台杀手 select music_name from ( select distinct music_name,l.music_id from ( select user_id,f.follower_id,t.music_id from follow f left join ( select follower_id,music_id from music_likes m right join follow f on f.follower_id=m.user_id )t on t.follower_id=f.follower_id where user_id=1 and (user_id,t.music_id) not in (select user_id,music_id from music_likes where user_id =1 )

)l left join music c on c.id=l.music_id order by l.music_id )z

我是sb

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务