select user_profile.device_id,question_id,result
from question_practice_detail join user_profile 
     on question_practice_detail.device_id = user_profile.device_id
where university = '浙江大学'
order by question_id

这里注意:当使用表连接时,select里的两表共有字段一定要加前缀就像这样user_profile.device_id,否则会报错