题解 | #浙大不同难度题目的正确率#
浙大不同难度题目的正确率
http://www.nowcoder.com/practice/d8a4f7b1ded04948b5435a45f03ead8c
sql查询优先级
1.from
2.on
3.join
4.where
5.group by
6.having
7.select !!!!!!!!!
8.distinct
9.order by
SELECT difficult_level, sum(if(result = 'right',1,0)) / count(result) as correct_rate FROM user_profile t1 INNER join question_practice_detail t2 on t1.device_id = t2.device_id INNER JOIN question_detail t3 on t2.question_id = t3.question_id where university = '浙江大学' group by difficult_level order by correct_rate