Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
d5813488
Commit
d5813488
authored
14 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Adjust documentation wording of window function ORDER BY to not mention
avg() because it was inaccurate.
parent
8c0f1e27
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/src/sgml/advanced.sgml
+4
-4
4 additions, 4 deletions
doc/src/sgml/advanced.sgml
with
4 additions
and
4 deletions
doc/src/sgml/advanced.sgml
+
4
−
4
View file @
d5813488
...
@@ -383,10 +383,10 @@ SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM emps
...
@@ -383,10 +383,10 @@ SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM emps
</para>
</para>
<para>
<para>
Although <function>avg</> will produce the same result no matter
You can also control the order in which rows are processed by
w
hat order it processes the parti
tion
'
s
rows in, this is not true of all
w
indow func
tions
using <literal>ORDER BY</> within <literal>OVER</>.
window
functions. When needed, you can control that order using
(The
window
<literal>ORDER BY</> does not even have to match the
<literal>ORDER BY</> within <literal>OVER</>.
Here is an example:
order in which the rows are output.)
Here is an example:
<programlisting>
<programlisting>
SELECT depname, empno, salary, rank() OVER (PARTITION BY depname ORDER BY salary DESC) FROM empsalary;
SELECT depname, empno, salary, rank() OVER (PARTITION BY depname ORDER BY salary DESC) FROM empsalary;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment