7.2.5. Window Function Processing
7.2.5.窗口函数处理
If the query contains any window functions (see Section 3.5, Section 9.21 and Section 4.2.8), these functions are evaluated after any grouping, aggregation, and HAVING filtering is performed. That is, if the query uses any aggregates, GROUP BY, or HAVING, then the rows seen by the window functions are the group rows instead of the original table rows from FROM/WHERE.
如果查询中包含窗口函数(参见3.5节,9.21节和4.2.8节),那么这些函数会在分组、聚合和HAVING之后执行。也就是说,如果查询中包含了聚合、GROUP BY或者HAVING,那么窗口函数所作用的行即为分组之后的行,而不是来自FROM/WHERE的原始行。
When multiple window functions are used, all the window functions having syntactically equivalent PARTITION BY and ORDER BY clauses in their window definitions are guaranteed to be evaluated in a single pass over the data. Therefore they will see the same sort ordering, even if the ORDER BY does not uniquely determine an ordering. However, no guarantees are made about the evaluation of functions having different PARTITION BY or ORDER BY specifications. (In such cases a sort step is typically required between the passes of window function evaluations, and the sort is not guaranteed to preserve ordering of rows that its ORDER BY sees as equivalent.)
当使用多个窗口函数 时,所有的窗口函数在其窗口定义中具有等效的PARTITION BY 和ORDER BY子句,确保了其可通过在数据的一次传递来进行评估。因此,即使ORDER BY不能唯一地确定顺序,它们也将看到相同的排序顺序。但是,不能保证具有不同PARTITION BY或ORDER BY规范的函数也具有相同行为。(在这种情况下,通常在传递窗口函数评估之间需要一个排序步骤,并且不能保证该排序能保留与ORDER BY等效的行的顺序。)
Currently, window functions always require presorted data, and so the query output will be ordered according to one or another of the window functions' PARTITION BY/ORDER BY clauses. It is not recommended to rely on this, however. Use an explicit top-level ORDER BY clause if you want to be sure the results are sorted in a particular way.
当前,窗口函数始终需要预排序的数据,因此查询输出将根据窗口函数的PARTITION BY / ORDER BY子句中的一个进行排序。但是,不建议依赖于此。 如果想要确保结果以特定方式排序,请使用显式的ORDER BY子句。

7.2.5. Window Function Processing相关推荐

  1. mysql8 create table 语法错误_MySQL8.0 Window Function 剖析

    title: $MySQL8.0 Window Functions 剖析 author: $马腾 什么是window function window function 是在满足某种条件的记录集合上执行 ...

  2. 1.20_Flink的Window全面解析\Keyed Windows\Window Assigners\Tumbling,Sliding,Session,Global,Window Function

    1.20.透过窗口看无限数据流----Flink的Window全面解析 1.20.1.Quick Start 1.20.1.1.是什么? 1.20.1.2.如何用? 1.20.1.2.1.Keyed ...

  3. Vue父组件调用子组件的方法并传参的两种方式(用$refs.refName.functionName、window.function)

    如需了解儿子怎么控制老子的,传送门:https://s-z-q.blog.csdn.net/article/details/120094689 父组件father.vue <template&g ...

  4. 窗函数(Window Function)在信号处理当中的应用

    窗函数(Window Function)在信号处理当中的应用 1. 从两个重要极限到时域低通滤波器 两个重要极限 数学里常常会把两个非常重要而且非常常见的极限放在一起,并称他们为两个重要极限. 第一个 ...

  5. 窗函数(window function)

    原文地址:窗函数(window function) 作者:了凡春秋 窗函数是频谱分析中一个重要的部分,窗函数修正了由于信号的非周期性并减小了频谱中由于泄露而带来的测量不准确性. 快速傅里叶变换假定了时 ...

  6. 窗口函数(Window Function)

    文章目录 窗口函数概述 窗口函数和聚合函数的区别 使用要点 应用场景 语法结构 非聚合窗口函数 rank dense_rank row_number cume_dist percent_rank fi ...

  7. 4.2.8. Window Function Calls

    4.2.8. Window Function Calls 4.2.8.窗口函数调用 A window function call represents the application of an ag ...

  8. Flink Window Function

    窗口函数定义了要对窗口中收集的数据做的计算操作,根据处理的方式可以分为两类:增量聚合函数和全窗口函数. 文章目录 1.增量聚合函数 1.1 ReduceFunction 1.2 AggregateFu ...

  9. SQL Server Window Function 窗体函数读书笔记二 - A Detailed Look at Window Functions

    这一章主要是介绍 窗体中的 Aggregate 函数, Rank 函数, Distribution 函数以及 Offset 函数. Window Aggregate 函数 Window Aggrega ...

最新文章

  1. Delta3D———通过游戏管理器组件和消息的扩展创建自定义行为 《转》
  2. SpringBoot第十七篇:上传文件
  3. 《剑指offer》-逐层打印二叉树
  4. python利用决策树进行特征选择
  5. Mybatis问题:There is no getter for property named 'unitId' in 'class java.lang.String'
  6. Ionic 标签中添加单击事件 、双击事件
  7. python idle撤回上一条命令_找回Python IDLE Shell里的历史命令(用上下键翻历史命令怎么不好用了呢?)...
  8. ELK实时日志分析平台环境部署--完整记录
  9. pt-archiver 数据归档bug
  10. storm mysql druid_Druid 集成
  11. (原创)浅谈BUG资产,用例资产的作用
  12. 消息中间件--RabbitMQ ---高级特性之消费端ACK与重回队列
  13. C++学习系列笔记(三)
  14. 配置ganesha-nfs对接rgw
  15. delphi的 PosEx 函数功能介绍
  16. Scala 深入浅出实战经典 第81讲:Scala中List的构造是的类型约束逆变、协变、下界详解...
  17. 美国计算机科学本科申请条件,美国计算机专业申请条件
  18. hurst指数matlab代码_Matlab 简介
  19. 基于开源 Rexsee 的 UP 移动浏览器开放测试
  20. DNS云学堂 | 行车不规范亲人两行泪,NS不规范运维两行泪

热门文章

  1. iptables详解之filter
  2. 计算机的硬件(计算机组成原理)
  3. 龙芯linux安装checkinstall方法
  4. 关于 .Net 逆向的那些工具:反编译篇
  5. 【Windows自带的端口转发netsh interface portproxy,本机转发虚拟机】
  6. 哈希表(JavaScript实现)
  7. 微信小程序+网页--证件照换底色前端页面实现修改总结
  8. 解析数据上链以及数据上链的现实意义
  9. 易语言教程读配置项和写配置项
  10. win2003dns服务器其它域名解析不,win2003 DNS服务器配置方法[图文详解]