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

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

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

select *
from
(select exam_id as tid,count(distinct uid) as uv,count(start_time) as pv
from exam_record
group by exam_id
order by uv desc,pv desc)t1
union all
select *
from
(select question_id as tid,count(distinct uid) as uv,count(submit_time) as pv
from practice_record
group by question_id
order by uv desc,pv desc)t2

得加select *,只加括号不行

全部评论

相关推荐

09-29 17:44
已编辑
蔚来_测(准入职员工)
//鲨鱼辣椒:见不了了我实习了四个月上周再投筛选了一天就给我挂了
点赞 评论 收藏
分享
在努力的外卷侠很靠谱:怎么,大家都没保底吗?我这美团已经入职了,不说了,系统派单了。
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务