select sno,cno,score from grade,(
select cno,min(score) as score
from grade
group by cno )as table1
where table1.cno=grade.cno and table1.score=grade.score
select sno,cno,min(score)
from grade
group by cno, sno
就可以了
group by 是分组的意思,上面要查的sno 也要进行分组
bochins 的答案ok
如果想要不出问题,所有select后面出现的字段都应该在groupby里面出现