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


with temp1 as (
select 
    user_id,
    follower_id
    from follow where user_id=1 )
     

,temp2 as (
    select
        distinct music_id
        from 
        temp1 a join  music_likes b 
        on a.follower_id=b.user_id where music_id not in (select music_id 
        from music_likes where user_id=1
        )
)

select 
    music_name
    from 
    temp2 a join music b
    on a.music_id=b.id

全部评论

相关推荐

点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务