在数据库test 中的一个表 student,字段是 name,class,score。分别代表姓名、所在 班级,分数。 1) 学出每个班级中的学生,按照成绩降序排序; Select namefrom student order byclass,scoredesc 2) 查出每个班的及格人数和不及格人数,格式为:class、及格人数、不及格人数; select class count(case when score>60 then”jg”) as jgrs,cout(case when score<=60 then “big”) as bjgrwfrom strdent group byclass; 3) 用 PHP 写入连接数据库("localhost","msuser","mspass")、执行以上 SQL、显示结果、 判断错误、关闭数据库的过程;

发布于 2020-12-26 13:49:57

登录后免费查看答案
关注者
0
被浏览
58
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看