题解 | #浙江大学用户题目回答情况#
浙江大学用户题目回答情况
http://www.nowcoder.com/practice/55f3d94c3f4d47b69833b335867c06c1
记录一下等价的sql写法:
完整代码:
方法1代码: select qpd.device_id, qpd.question_id, qpd.result from question_practice_detail as qpd inner join user_profile as up on up.device_id=qpd.device_id and up.university='浙江大学'
方法2代码: select device_id, question_id, result from question_practice_detail where device_id in ( select device_id from user_profile where university='浙江大学' )