题解 | #浙江大学用户题目回答情况#
浙江大学用户题目回答情况
http://www.nowcoder.com/practice/55f3d94c3f4d47b69833b335867c06c1
select device_id, question_id, result
from question_practice_detail
where device_id in
(select device_id from user_profile where university = "浙江大学");
在 () 中优先执行
SELECT u.device_id,q.question_id,q.result
from question_practice_detail q,user_profile u
where university = '浙江大学'and q.device_id=u.device_id
表名.属性可以在不同的表之间查询
SELECT u.device_id,q.question_id,q.result from question_practice_detail q
join user_profile u on q.device_id=u.device_id
where university="浙江大学"
联合查询