快乐

kuaile
2439 号测试 成员, 2020-03-25 09:22:26 加入
2.2k
个人主页浏览
  • 20200325 数据库连接查询面试题作业

    2020-07-24 10:57
    1	查询出语文最高分 
    select max(score) as '语文最高分' from sc inner join course as c on c.Cno=sc.Cno where c.Cname='语文' 
    2	查询语数外三门成绩的平均分
    select c.Cname,avg(sc.score)as '平均分' from course as c inner join sc on c.Cno=sc.Cno group by c.Cno,c.Cname 
    3	查询报名孤独求败老师课程的学生信息 
    select * from student as s inner join sc on s.Sno=sc.Sno inner join course as c on sc.Cno=c.Cno right join teacher as t on t.Tno=c.Tno where t.Tname='孤独求败'
    
    
  • 20200325 数据库连接查询面试题作业

    2020-07-24 10:57

    1、 查询出语文最高分
    select max(score) as '语文最高分' from sc inner join course as c on c.Cno=sc.Cno
    where c.Cname='语文'
    2、查询语数外三门成绩的平均分
    select c.Cname,avg(sc.score)as '平均分' from course as c inner join sc on c.Cno=sc.Cno
    group by c.Cno,c.Cname
    3、查询报名孤独求败老师课程的学生信息
    select * from student as s inner join sc on s.Sno=sc.Sno
    inner join course as c on sc.Cno=c.Cno
    right join teacher as t on t.Tno=c.Tno
    where t.Tname='孤独求败'