summaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2013-07-16 20:15:36 -0400
committerNoah Misch <noah@leadboat.com>2013-07-16 20:15:36 -0400
commitb560ec1b0d7b910ce13edc51ffaafaca72136e3b (patch)
treeae5d80c94681788fd214efe6d61425089850781e /doc/src/sgml/ref
parent7a8e9f298e7b8158296e1ea72ca8987323c10edf (diff)
Implement the FILTER clause for aggregate function calls.
This is SQL-standard with a few extensions, namely support for subqueries and outer references in clause expressions. catversion bump due to change in Aggref and WindowFunc. David Fetter, reviewed by Dean Rasheed.
Diffstat (limited to 'doc/src/sgml/ref')
-rw-r--r--doc/src/sgml/ref/select.sgml5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml
index 68309ba94da..b0cec1421ca 100644
--- a/doc/src/sgml/ref/select.sgml
+++ b/doc/src/sgml/ref/select.sgml
@@ -598,6 +598,11 @@ GROUP BY <replaceable class="parameter">expression</replaceable> [, ...]
making up each group, producing a separate value for each group
(whereas without <literal>GROUP BY</literal>, an aggregate
produces a single value computed across all the selected rows).
+ The set of rows fed to the aggregate function can be further filtered by
+ attaching a <literal>FILTER</literal> clause to the aggregate function
+ call; see <xref linkend="syntax-aggregates"> for more information. When
+ a <literal>FILTER</literal> clause is present, only those rows matching it
+ are included.
When <literal>GROUP BY</literal> is present, it is not valid for
the <command>SELECT</command> list expressions to refer to
ungrouped columns except within aggregate functions or if the