解法一:left JOIN
select t1.device_id,question_id,result
from question_practice_detail t1
left JOIN user_profile t2
on t1.device_id = t2.device_id
where university = '浙江大学'
解法二:子查询
select
device_id,
question_id,
result
from question_practice_detail
where device_id = (select device_id
from user_profile
where university = '浙江大学')