Skip to content

Commit d581348

Browse files
committed
Adjust documentation wording of window function ORDER BY to not mention
avg() because it was inaccurate.
1 parent 8c0f1e2 commit d581348

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/src/sgml/advanced.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,10 @@ SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM emps
383383
</para>
384384

385385
<para>
386-
Although <function>avg</> will produce the same result no matter
387-
what order it processes the partition's rows in, this is not true of all
388-
window functions. When needed, you can control that order using
389-
<literal>ORDER BY</> within <literal>OVER</>. Here is an example:
386+
You can also control the order in which rows are processed by
387+
window functions using <literal>ORDER BY</> within <literal>OVER</>.
388+
(The window <literal>ORDER BY</> does not even have to match the
389+
order in which the rows are output.) Here is an example:
390390

391391
<programlisting>
392392
SELECT depname, empno, salary, rank() OVER (PARTITION BY depname ORDER BY salary DESC) FROM empsalary;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy