美文网首页
sql语句之分组,聚合函数

sql语句之分组,聚合函数

作者: 软件测试笔记 | 来源:发表于2017-11-22 16:26 被阅读0次

    1.背景:作为一名测试工程师,sql语句也是必备技能,刚好前两天朋友的面试题做为列子简单做下笔记

    2.question:

    3.answer:

    1)update employee set salary=salary+200 where age>=40 and salary<2000

    2)select distinct depart.name,count(depart.id) as m from depart ,employee,DE where employee.ID=DE.eid and depart.id=DE.did and employee.age>=40 and employee.salary<2200 GROUP BY(depart.name) order by  m

    4.提示:个人觉得sql语句并不难,格外要注意的是各个语句的执行顺序,推荐大家看下这篇博客写的很详细

    https://www.cnblogs.com/ghost-xyx/p/3811036.html

    ~还有左联、外联、跨表联

    相关文章

      网友评论

          本文标题:sql语句之分组,聚合函数

          本文链接:https://www.haomeiwen.com/subject/wwfovxtx.html