- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
oracle 分析函数的使用(Oracle analysis of the use of function)
oracle 分析函数的使用(Oracle analysis of the use of function)
Analysis of grammatical function
FUNCTION_NAME (argument, argument...)
OVER
(partition-clauseorder-by-clausewindowing clause)
For example:
Sum (SAL) over (partition by deptno order by ename new_alias)
Over is a keyword that identifies the analysis function, otherwise the query analyzer cannot distinguish (sum) and (sum) aggregation function analysis function
Partition by deptno is an optional partitioning clause, if there is any partition clause, all the results can be regarded as a single large area
Order by ename order is an optional by clause, some functions need it, some are not sorted. Rely on those functions, such as data access for the results from the LAG and LEAD, a line of the previous line and must be used, other functions, such as AVG, you do not need to have any window function. In the ranking, this clause is mandatory, it is specified in the calculation function within a set of data is how to sort, in the order by nulls last can be added after the words, such as order by comm desc nulls last, said the sort column empty rows ignore comm.
Analysis of function is executed in a query in the last set of operations, you cannot use where or having in the above sentence.
- Example
DEMO@Wesley customer_id, region_id select, sum (customer_sales) total,
2 (rank) over (order by sum desc rank (customer_sales)),
3 (dense_rank) over (order by sum desc dense_rank (customer_sales)),
4 (row_number) over (order by sum desc row_number (customer_sales))
5 from user_order
6 group by region_id, customer_id;
REGION_ID CUSTOMER_ID TOTAL RANK DENSE_RANK ROW_NUMBER
-------------------------------------------------------------
9252232703111
8171944281222
7141929774333
541878275444
10261808949555
661788836666
8201413722777
10271322747888
7131310434999
7151255591101010
8 18 1253840 11 11 11
-------------------------------------------------------------- + +
| 9 23 1224992 12 12 12 |
| 9 24 1224992 12 12 13 |
| 5 2 1224992 12 12
您可能关注的文档
- flash动画的复习提问设计(Flash animation design review questions).doc
- ecshop模板如何修改详细图解(How to modify the ECSHOP template with graphic).doc
- flunet英文(熟练的英文).doc
- fm2012 新训练系统的详细攻略与使用心得(Detailed strategy and experience the new fm2012 training system).doc
- flash10使用rtmfp 开发点对点p2p应用(Flash10 developed using rtmfp peer-to-peer applications P2P).doc
- fm24c512驱动(Fm24c512 driver).doc
- excel的中宏从入门到精通(Excel - from entry to the master).doc
- e是无理数的证明方法(E is a method of proof of an irrational number).doc
- for的语法上下(The syntax of for on).doc
- for高中物理方法(For method of high school physics).doc
- oracle 分析日志(Oracle分析日志).doc
- oracle 常用的sql语法和数据对象(Oracle commonly used SQL syntax and data object).doc
- oracle 基本语法(Oracle基本语法).doc
- oracle 日志分析工具使用说明logmnr(Oracle log analysis tools use LOGMNR).doc
- oracle中to_date格式 to_date格式(The to_date format of to_date Oracle).doc
- oracle中使用logminer分析日志(Oracle used in logminer log analysis).doc
- oracle克隆安装(oracle克隆安装).doc
- oracle官方文档如何学习(Oracle official documents how to learn).doc
- oracle控制台服务找不到问题解决(The Oracle console service can not find the problem).doc
- oracle数据库plsql的分析函数(The analysis function of Oracle PLSQL database).doc
最近下载
- 正常新生儿护理演示ppt课件.ppt
- 硬笔楷书教学课件.pptx VIP
- 天津市南开翔宇学校初一新生分班(摸底)数学模拟考试(含答案).pdf VIP
- 第1课 寻找信息科技(教学设计)-2024-2025学年人教版(2024)信息三年级全一册.docx VIP
- 南京电子地图超大版-超清晰-3600-x-5100分辨率.pdf VIP
- 冷轧带钢再结晶退火的感应加热.pdf VIP
- (高清版)B-T 18380.12-2022 电缆和光缆在火焰条件下的燃烧试验 第12部分:单根绝缘电线电缆火焰垂直蔓延试验 1kW预混合型火焰试验方法.pdf VIP
- 大学生竞选班长最新PPT课件.ppt VIP
- 云教版劳动与技术四年级上册2切菜.pptx VIP
- 育婴员(职工组)基础知识模块(模块一).docx VIP
文档评论(0)