student(sno,sname,ssex,snative)–snative 是民族
course(cno,cname,credit)
sc(sno,cno,grade)
select snative,count(snative) from student group by snative
select sum(c.credit)
from course c
inner join (select distinct sc.cno from sc) s
on c.cno=s.cno
select c.cno,s.grade,count(s.sno)
from course c
inner join sc s
on c.cno=s.cno
group by s.grade,c.cno;
原文:https://www.cnblogs.com/lightice/p/12692590.html