假设数据库std_dbs中有3个表,各表逻辑结构设计如下:

2025-04-02 10:28:04
推荐回答(1个)
回答1:

1、
select student. 学号,student.姓名,(select sum(grade.成绩) from grade where grade.学号=student.学号) from stdent order by (select sum(grade.成绩) from grade where grade.学号=student.学号) desc
2、视图的主要语句如下:
select student. 学号,student.姓名 from stdent where (select count(grade.学号) from grade where grade.学号=student.学号 and grade.成绩>90)>2