比较有难度的SL笔试.docVIP

  • 5
  • 0
  • 约1.18万字
  • 约 7页
  • 2018-11-12 发布于江苏
  • 举报
比较有难度的SL笔试

Student(SID, Sname, Sage, Ssex) 学生表 Course(CID, Cname, TID) 课程表 SC(SID, CID, score) 成绩表 Teacher(TID, Tname) 教师表 问题: 1、查询“001”课程比“002”课程成绩高的所有学生的学号; select a.SID from (select Sid,score from SC where CID=001) a,(select Sid,score from SC where CID=002) b where a.scoreb.score and a.Sid=b.Sid; 2、查询平均成绩大于60分的同学的学号和平均成绩; select SID,avg(score) from sc group by SID having avg(score) 60; 3、查询所有同学的学号、姓名、选课数、总成绩; select Student.SID,Student.Sname,count(SC.CID),sum(score) from Student left Outer join SC on Student.SID=SC.SID group by Student.SID,Sname 4、查询姓“李”的老师的

文档评论(0)

1亿VIP精品文档

相关文档