摘要: 现有一个需求,表关系图如下所示: 问题一: 求每个学生的平均成绩、总成绩,且筛选出平均成绩大于80 select student.name,avg(score.score),sum(score.score) from student inner join score on student.id = 阅读全文
posted @ 2021-05-10 21:15 460限定用户 阅读(31) 评论(0) 推荐(0) 编辑
摘要: +00.创建表结构 0.1 学生表&上课记录 #1、student表 create table student( id int auto_increment, name char(32) not null, age int not null, register_data date not null, 阅读全文
posted @ 2021-05-10 20:58 460限定用户 阅读(588) 评论(0) 推荐(0) 编辑
摘要: 00.数据准备 0.1 创建表 drop table if exists students; create table students ( studentNo varchar(10) primary key, name varchar(10), sex varchar(1), hometown v 阅读全文
posted @ 2021-05-10 20:48 460限定用户 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 01.表操作 1.1 创建表 create table students( id int unsigned primary key auto_increment, name varchar(20), # 姓名长度为 20 age int unsigned, # 年龄为正整数 height decim 阅读全文
posted @ 2021-05-10 20:45 460限定用户 阅读(48) 评论(0) 推荐(0) 编辑