本题目要求编写SQL语句,
在sc表
中查询平均成绩高于75分的学生。
表结构:
请在这里写定义表结构的SQL语句。例如:
CREATE TABLE `sc` (
`sno` char(4) NOT NULL,
`cno` char(4) NOT NULL,
`grade` decimal(6,1) DEFAULT NULL,
PRIMARY KEY (`sno`,`cno`),
);
表样例
请在这里给出上述表结构对应的表样例。例如
sc
表:
输出样例:
请在这里给出输出样例。例如:
select sno as 学号,avg(grade) as 平均成绩
from sc
group by sno
having avg(grade)>75