北京到西沙群岛旅游:SQL问题,分组统计

来源:百度文库 编辑:高考问答 时间:2024/04/30 05:21:19
建立了两个表 student(主码 sno,外来码dno) 和dep(主码dno)
现在要统计每个系的学生人数,同时输出系名
怎样写语句啊?

select count(*),系名
from studet,dep
group by 系名
where student.dno = dep.dno