题解 | #浙大不同难度题目的正确率#

浙大不同难度题目的正确率

http://www.nowcoder.com/practice/d8a4f7b1ded04948b5435a45f03ead8c

直接用平均就可以求出占比,外键同名可以直接用using,无需重命表名,这样不用处理字段重名
select difficult_level,
avg(if(result='right',1,0)) correct_rate
from user_profile
left join question_practice_detail
using(device_id)
join question_detail
using(question_id)
where university='浙江大学'
group by difficult_level
order by correct_rate


全部评论

相关推荐

谁知道呢_:要掉小珍珠了,库库学三年,这个结果
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务