Name
DB.DBA.VECTOR_AGG — Returns a vector of passed values.
Synopsis
vector
DB.DBA.VECTOR_AGG
(
|
value_expression
any
) ; |
Description
DB.DBA.VECTOR_AGG
returns a vector of passed values. The order of items in the vector
repeats the order of passing individual values to the aggregate.
Parameters
value_expression
Value of item for aggregation.
Return Types
Any
Examples
Example 24.1.
As the order of items in the vector repeats the order of passing individual values to the aggregate, it is possible to write, for instance:
-- Get an ordered vector of X-es SELECT DB.DBA.VECTOR_AGG (subquery.X) FROM (SELECT X FROM ... ORDER BY X) as subquery
or
SELECT DB.DBA.VECTOR_AGG (subquery.Y) FROM (SELECT Y FROM ... ORDER BY X) as subquery
and get vector of Y-s that are ordered by matching values of X-es.