Home > Database > Mysql Tutorial > mysql查询学生成绩及各科成绩的排名

mysql查询学生成绩及各科成绩的排名

WBOY
Release: 2016-06-06 09:41:40
Original
4200 people have browsed it

mysqlsql

学生表student有主键id,学号stuNum,姓名stuName,
课程表course有课程名称主键id,cname
成绩表sc有主键id,学生表id,课程表id
班级表class有主键id,班级名称cname,外键gid关联年纪表的id主键
年纪表grade有主键id,年纪名称gname
年纪-课程表gc有主键id,年纪表gid,课程表cid
所有的表主键id都是uuid
现在查询一个学生的各科成绩以及每科的成绩在班级和在年纪的排名,(如可以能否一并查出该学生的总分和平均分以及在班级的排名和在全年级的排名),这能不能做到??
如有需要数据库文件,可以留下邮箱,我私下发给你

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template