1. 首页
  2. 数据库
  3. Oracle
  4. 根据子串分组-big.data.analytics.with.spark

根据子串分组-big.data.analytics.with.spark

上传者: 2024-07-07 03:45:40上传 PDF文件 31.31MB 热度 11次
8.5、分部门连续求和select deptno,sal ,sum(sal) over (partition by deptno order by ename) as s from emp;分部门连续求和sum(sal) over (partition by deptno)分部门求和8.6、得到当前行上一行或者下一行的数据select ename,sal,lead(sal) over(order by sal) aaa ,lag(sal) over(order by sal) bbb from emp; month person income月份人员收入要求用一个SQL语句,统计每个月及上月和下月的总收入要求列表输出为月份当月收入上月收入下月收入select month,sum(income),lead(sum(income)) over(order by sum(income)) from table group by month; 8.7、根据子串分组Select to_char(hiredate,‟yyyy‟),avg(sal) from emp group by to_char(hiredate,‟yyyy‟);
用户评论