select distinct a.sid
from SC a,SC b
where a.sid=b.sid and a.cid='001' and b.cid='002' and a.score > b.score;
Student表:
sc表:
Teacher:
Course表:
select distinct a.sid
from SC a,SC b
where a.sid=b.sid and a.cid='001' and b.cid='002' and a.score > b.score;
Student表:
sc表:
Teacher:
Course表: