[
http://tracker.firebirdsql.org/browse/CORE-1688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Philippe Makowski reopened CORE-1688:
-------------------------------------
ok so I reopen this one
and please add sub tasks for
percent_rank()
cume_dist()
ntile(num_buckets integer)
first_value(value any)
last_value(value any)
nth_value(value any, nth integer)
> ANSI SQL2003 Window Functions
> -----------------------------
>
> Key: CORE-1688
> URL: http://tracker.firebirdsql.org/browse/CORE-1688
> Project: Firebird Core
> Issue Type: New Feature
> Components: Engine
> Reporter: Philippe Makowski
> Assignee: Adriano dos Santos Fernandes
> Priority: Minor
> Fix For: 3.0 Alpha 1
>
>
> After CTE, it would be nice to have ANSI SQL Window Functions
> SQL2003 allows for a window_clause in aggregate function calls, the addition
> of which makes those functions into window functions.
> SQL2003 specifies the following syntax for window functions:
> FUNCTION_NAME(expr) OVER {window_name|(window_specification)}
> window_specification ::= [window_name][partitioning][ordering][framing]
> partitioning ::= PARTITION BY value [, value...] [COLLATE collation_name]
> ordering ::= ORDER [SIBLINGS] BY rule [, rule...]
> rule ::= {value|position|alias} [ASC|DESC] [NULLS {FIRST|LAST}]
> framing ::= {ROWS|RANGE} {start|between} [exclusion]
> start ::= {UNBOUNDED PRECEDING|unsigned-integer PRECEDING|CURRENT ROW}
> between ::= BETWEEN bound AND bound
> bound ::= {start|UNBOUNDED FOLLOWING|unsigned-integer FOLLOWING}
> exclusion ::= {EXCLUDE CURRENT ROW|EXCLUDE GROUP
> |EXCLUDE TIES|EXCLUDE NO OTHERS}
> List of Window Functions
> CUME_DIST( ) OVER {window_name|(window_specification)} : Calculates the
> cumulative distribution, or relative rank, of the current row to other rows
> in the same partition
> DENSE_RANK( ) OVER {window_name|(window_specification)} : Assigns a rank to
> each row in a partition, which should be ordered in some manner. The rank for
> a given row is computed by counting the number of rows preceding the row in
> question, and then adding 1 to the result. Rows with duplicate ORDER BY
> values will rank the same. Unlike the case with RANK( ), gaps in rank numbers
> will not result from two rows sharing the same rank.
> RANK( ) OVER {window_name|(window_specification)} : Assigns a rank to each
> row in a partition, which should be ordered in some manner. The rank for a
> given row is computed by counting the number of rows preceding the row in
> question, and then adding 1 to the result. Rows with duplicate ORDER BY
> values will rank the same, and will lead to subsequent gaps in rank numbers.
> PERCENT_RANK( ) OVER ({window_name|(window_specification)} : Computes the
> relative rank of a row by dividing that row's rank less 1 by the number of
> rows in the partition, also less 1
> ROW_NUMBER( ) OVER ({window_name|(window_specification)} : Assigns a unique
> number to each row in a partition.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel