您的当前位置:首页access

access

2021-11-10 来源:乌哈旅游


1

INSERT INTO Teachers ( 教师号, 姓名, 性别, 年龄, 参加工作年月, 党员, 应发工资, 扣除工资 )

VALUES (\"600001\\"杨梦\\"女\\"64\#4/22/1966#, YES, 1600, 210)

2

DELETE FROM Teachers WHERE 年龄<36 And 性别=\"女\"

3

UPDATE teachers SET 应发工资 = 1.2*应发工资

WHERE Year(Date())-Year(参加工作年月)>25

4

SELECT 教师号, 姓名, 应发工资-扣除工资 AS 实发工资

FROM Teachers

WHERE Year(参加工作年月)<=1990

ORDER BY 应发工资-扣除工资 DESC

5

SELECT Count( * ) AS 人数, Avg(应发工资-扣除工资) AS 实发工资

FROM Teachers

6

SELECT 性别, Min(应发工资-扣除工资) AS 最低工资, Max(应发工资-扣除工资) AS 最高工资, Avg(应发工资-扣除工资) AS 平均工资

FROM Teachers

GROUP BY 性别

7

SELECT teachers.党员, Count(students.学号) AS 学生人数, Avg(students.分数) AS 平均成绩

FROM students INNER JOIN teachers ON students.教师号=teachers.教师号

GROUP BY teachers.党员

ORDER BY Avg(students.分数) DESC

8

SELECT 党员, Count(教师号) AS 人数, Avg(年龄) AS 平均年龄

FROM teachers

GROUP BY 党员

9

SELECT students.学号, students.姓名 AS 学生姓名, teachers.教师号, teachers.姓名 AS 教师姓名, teachers.性别

FROM students INNER JOIN teachers ON students.教师号 = teachers.教师号

ORDER BY students.学号 DESC

10

SELECT teachers.教师号, teachers.姓名, Max(students.分数) AS 最高分, Min(students.分数) AS 最低分, Avg(students.分数) AS 平均分

FROM teachers INNER JOIN students ON students.教师号=teachers.教师号

GROUP BY teachers.教师号, teachers.姓名

因篇幅问题不能全部显示,请点此查看更多更全内容