查询1832班的成绩信息 | select*from class1832; |
查询1833班,语文成绩大于80小于90的成绩信息 | select*from class1833 where chinese>80 and chinese<90; |
查询学生表中5到10行的数据 | select*from class where limit 4,6; |
显示1832班英语成绩为98,数学成绩为77的姓名与学号 | select*from class1832 where english=98 and math=77; |
查询出1832班成绩并且按语文成绩排序(降序) | select*class1832 order by chinese desc ; |
查询1833班与1832班,语文成绩与数学成绩都小于80的姓名。 | select*from class1833 where chinese<80 and math<80 or class1832 where chinese<80 and math<80; |
查询出没有参加语文考试的学生姓名和班级名称。 | select*class where chinese is null; |
求出班上语文成绩不及格的学生姓名 | select*class where chinese <60; |
求出每个班的数学平均成绩 | select vag (math)from class; |
求出每个班级语文成绩总分 --涉及到每个的时候都需要分组 | select count(chinese)from class group by class; |