liucheng

youmaobing233
2424 号测试 成员, 2020-03-25 01:16:44 加入
1.3k
个人主页浏览
  • 20200327 连接子查询作业

    2020-07-24 10:57

    1:
    image.png
    2:
    image.png

    3:第三题觉得题意有点模糊,我理解的是求职位为CLERK的员工姓名、以及员工所在的部门名称及部门名称中有CLERK员工的人数,不知道理解得对不对,还是这个部门人数只是单纯的部门有的员工数量
    image.png

  • 20200326 连接子查询作业

    2020-07-24 10:57

    1:
    image.png

    2:
    image.png

  • 20200325 数据库连接查询面试题作业

    2020-07-24 10:57

    1:
    select MAX(score) from sc s inner join course c on s.Cno = c.Cno and c.Cname = '语文'

    2:
    select AVG(s.score),c.Cname from sc s inner join course c on s.Cno = c.Cno
    GROUP BY c.Cname;

    3:
    SELECT * from student s inner join sc c on s.Sno = c.Sno
    inner join course r on r.Cno = c.Cno
    inner join teacher t on t.Tno = r.Tno where t.Tname = '孤独求败'

  • 20200324 连接查询作业

    2020-07-24 10:57

    1:select * from emp inner join dept on emp.id=dept.id where emp.name like '张%'

    2:
    select count() from emp as a inner join emp as b on a.leader = b.id where b.name ='张三丰'
    select count(
    ) from emp as a inner join emp as b on a.leader = b.id and b.name ='张三丰'
    发现第二题用where 和and 的结果是一样的

    3:select * from emp where dept_id = 0