ID Course
选出选课数量>=2的学号
select distinct ID from test as A
where (Select count(ID) from test as B where A.ID=B.ID)>=2
1 2 3