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

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

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

select
    t2.music_name
from
(select
    m.id,
    m.music_name
from 
    (select 
        distinct music_id 
    from 
        music_likes 
    where 
        user_id in(select follower_id from follow where user_id=1) 
        and 
        music_id not in(select music_id from music_likes where user_id=1)
    ) t1
left join 
    music m 
on 
    t1.music_id=m.id
order by 
    t1.music_id asc
) t2

全部评论

相关推荐

02-04 13:52
已编辑
山西农业大学 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务