题解 | #北京大学或练题数大于2的学生ID#
北京大学或练题数大于2的学生ID
https://www.nowcoder.com/practice/b2b639586d89409b9c1fa82c083287dd
select device_id
from user_profile
where university = '北京大学'
union
select device_id
from question_practice_detail
group by device_id
having count(question_id)>2
order by device_id desc
from user_profile
where university = '北京大学'
union
select device_id
from question_practice_detail
group by device_id
having count(question_id)>2
order by device_id desc