oracle 云 BI,[Oracle]见习BI工程师之函数
求職!!!深圳南山有BI相關(guān)職位推薦的歡迎私信,謝謝 !
打開sqldeveloper
----新建連接----
----新建會話----
----新建會話級臨時表----
select * from emp;1
----新建中間表 再查找----
with bt as (select emp.* ,rank() over(partition by deptno order by sal desc) rank from emp)
select * from bt where rank<=3;1
2
3
----函數(shù)-----
–聚合函數(shù)–
sum()
avg()
count()
max()
min()
–分析函數(shù)–
排名函數(shù)
rank() over(partition by 字段 order by 字段)
row_number() over(partition by 字段 order by 字段)
dense_rank() over(partition by 字段 order by 字段)
遷移函數(shù)
lead() 上移
select ename 姓名 ,round((lead(sal,2) over(order by hiredate) -sal)/sal,3)*100||'%' 環(huán)比 from emp;1
2
lag() 下移
聚合分析函數(shù)
sum(字段) over(order by 字段)
select ename 姓名 ,sal 工資 ,sum(sal) over(order by hiredate) 累計工資 from emp;1
2
3
avg(字段) over(order by 字段)
count(字段) over(order by 字段)
max(字段) over(order by 字段)
min(字段) over(order by 字段)
文章來源: blog.csdn.net,作者:ALIMENTRY,版權(quán)歸原作者所有,如需轉(zhuǎn)載,請聯(lián)系作者。
原文鏈接:blog.csdn.net/qq_43745282/article/details/111770717
總結(jié)
以上是生活随笔為你收集整理的oracle 云 BI,[Oracle]见习BI工程师之函数的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Knative 核心概念介绍:Build
- 下一篇: 深入vuex原理(上)