题解 | #北京大学或练题数大于2的学生ID#

北京大学或练题数大于2的学生ID

https://www.nowcoder.com/practice/b2b639586d89409b9c1fa82c083287dd

select distinct c.device_id from (select
    a.device_id
from
    user_profile a,
    question_practice_detail b
where
    a.device_id = b.device_id
group by
    b.device_id
having
    count(question_id) > 2
union all
select
    device_id
from
    user_profile
where
    university = '北京大学') c order by device_id desc


全部评论

相关推荐

不愿透露姓名的神秘牛友
07-10 12:10
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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