题解 | #每个题目和每份试卷被作答的人数和次数#

每个题目和每份试卷被作答的人数和次数

https://www.nowcoder.com/practice/203d0aed8928429a8978185d9a03babc

select *
        from
        (
        select
            exam_id as tid
            ,count(distinct uid) as uv
            ,count(1) as pv
        from exam_record
        group by exam_id
        order by uv desc,pv desc
        ) m

        union all 
        
        select *
        from(
        select
            question_id as tid
            ,count(distinct uid) as uv
            ,count(1) as pv
        from practice_record
        group by question_id
        order by uv desc,pv desc
        ) k

全部评论

相关推荐

可可可可可_:nb啊,看样子是专科玩了几年随便专升本了个民办,又玩了两年。你这能找到我吃
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务