连续求和-big.data.analytics.with.spark
8.3、处理空值排序select * from emp order by comm desc nulls last(first); 8.4、查询跳过表中的偶数行select ename from (select row_number() over (order by ename) rn,ename from emp) x where mod(rn,2)=1; 8.5、查询员工信息与其中工资最高最低员工select ename,sal,max(sal) over(), min(sal) over() from emp; 8.5、连续求和select ename,sal,sum(sal) over(), sum(sal) over(order by ename) from emp; sum(sal) over(order by ename)指的是连续求和.是以ename来排序的。若有两个这样的窗口函数,以后面的排序为主。
用户评论