2018年12月6日

分组函数

摘要: group by() 分组统计 select 列名 统计函数 from emp group by 列名; 使用group by 必须指定分组的条件,分组之外的条件不可以 having having 与where的用法类似,放在分组函数之后使用 阅读全文

posted @ 2018-12-06 23:11 rxzhang 阅读(131) 评论(0) 推荐(0) 编辑

函数

摘要: 1.count()统计个数 select count(*) from emp;; 2.max() 最大值 select max(sal) from emp; 3.min() 最小值 select min(sal) from emp; 4.avg() 求平均数 select avy(sal) from 阅读全文

posted @ 2018-12-06 22:41 rxzhang 阅读(117) 评论(0) 推荐(0) 编辑

导航