select studentid from course='数学' or course='语文'
group by studentid
having count(distinct course)=2