分数匹配等级
2019-03-10 本文已影响0人
A_rrow
将sname,degree,rank三表组合匹配成一张新表
grade表
scores表
student表
SELECT sname,degree,rank FROM students
INNER JOIN scores ON (students.`sno` = scores.`sno`)
INNER JOIN grade ON
(scores.`degree` >= grade.`low` AND scores.`degree` <= grade.`upp`)
ORDER BY degree DESC
result