- 1、本文档共37页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
??
Analytic Functions in Oracle 8i and 9i
Oracle 8i and 9i分析函数
Contents目录
Overview and Introduction概述与简介How Analytic Functions Work分析函数原理The Syntax句法Calculate a running Total累计计算Top-N Queries前N条查询??? Example 1例1??? Example 2例2Windows窗口??? Range Windows范围窗口??? Compute average salary for defined range计算定义范围的平均工资??? Row Windows行窗口??? Accessing Rows Around Your Current Row访问当前行前后的行LAGLEADDetermine the First Value / Last Value of a Group确定组的首值和末值Crosstab or Pivot Queries交叉表或Pivot查询Conclusion结论Links and Documents链接和文档
Overview概述:
Analytic Functions, which have been available since Oracle 8.1.6, are designed to address such problems as Calculate a running total, Find percentages within a group, Top-N queries, Compute a moving average and many more. Most of these problems can be solved using standard PL/SQL, however the performance is often not what it should be. Analytic Functions add extensions to the SQL language that not only make these operations easier to code; they make them faster than could be achieved with pure SQL or PL/SQL. These extensions are currently under review by the ANSI SQL committee for inclusion in the SQL specification.
分析函数,最早是从ORACLE8.1.6开始出现的,它的设计目的是为了解决诸如“累计计算”,“找出分组内百分比”,“前-N条查询”,“移动平均数计算”等问题。其实大部分的问题都可以用PL/SQL解决,但是它的性能并不能达到你所期望的效果。分析函数是SQL言语的一种扩充,它并不是仅仅试代码变得更简单而已,它的速度比纯粹的SQL或者PL/SQL更快。现在这些扩展已经被纳入了美国国家标准化组织SQL委员会的SQL规范说明书中。
How Analytic Functions Work ? 分析函数的原理
Analytic functions compute an aggregate value based on a group of rows. They differ from aggregate functions in that they return multiple rows for each group. The group of rows is called a window and is defined by the analytic clause. For each row, a sliding window of rows is defined. The window determines the range of rows used to perform the calculations for the current row. Window sizes can be based on either a physical number of rows or a logical interval such as time. 分析函数是在一个记录行分组的基础上计算它们的总值。与集合函数不同,他们返回各分组的多行记录。行的分组被称窗口,并通过分析语句定义。对于每记录行,定义了一个“滑动”窗口。该窗口确定“当前行”计算的范围
您可能关注的文档
- 数据结构(C语言版)习题答案.doc
- 数据结构导论练习题.doc
- 数据结构课后练习题参考答案.doc
- 数据结构课后习题答案.doc
- 数据结构课后习题答案第1章.doc
- 数据结构课后习题答案第六章.doc
- 数据结构课后习题解答.doc
- 数据库课程设计报告-图书馆管理系统.doc
- 数控机床编程与操作第四周.ppt
- 数控铣床和加工中心加工及程序编制.ppt
- DB44_T 2611-2025 城市排水管网有毒有害气体监测与风险分级管理技术标准.pdf
- DB44_T 2612-2025 竞赛类科普活动策划与实施服务规范.pdf
- DB43_T 2947-2024 烟草种子质量控制规程.pdf
- DB37_T 4836-2025 煤矿风量实时监测技术要求.pdf
- 叉车防撞系统,全球前22强生产商排名及市场份额(by QYResearch).docx
- 超滤膜,全球前18强生产商排名及市场份额(by QYResearch).docx
- DB62T 4172-2020 玉米品种 酒623规范.pdf
- DB62T 4160-2020 在用真空绝热深冷压力容器综合性能在线检测方法.pdf
- DB62T 4164-2020 辣椒品种 酒椒1号.pdf
- DB62T 4133-2020 公路隧道地质超前预报机械能无损探测技术规程.pdf
文档评论(0)