Julian Hyde created CALCITE-1473:
------------------------------------
Summary: Ordered-set and hypothetical-set aggregate functions
Key: CALCITE-1473
URL: https://issues.apache.org/jira/browse/CALCITE-1473
Project: Calcite
Issue Type: Bug
Reporter: Julian Hyde
Assignee: Julian Hyde
Support ordered-set and hypothetical-set aggregate functions. Both have a
WITHIN GROUP clause. These are supported by Oracle, PostgreSQL, Microsoft SQL
Server.
Examples of ordered-set aggregate functions are {{mode}}, {{percentile_cont}},
{{percentile_disc}}. See [PostgreSQL
doc|https://www.postgresql.org/docs/9.5/static/functions-aggregate.html#FUNCTIONS-ORDEREDSET-TABLE].
Examples of hypothetical-set aggregate functions are {{rank}}, {{dense_rank}},
{{percent_rank}}, {{cume_dist}}. See [PostgreSQL
doc|https://www.postgresql.org/docs/9.5/static/functions-aggregate.html#FUNCTIONS-HYPOTHETICAL-TABLE].
The SQL standard says (in section 4.16.4 Aggregate Functions):
{quote}The hypothetical set functions are related to the window functions RANK,
DENSE_RANK, PERCENT_RANK, and CUME_DIST, and use the same names, though with a
different syntax.{quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)