Hitoshi Harada umi.tan...@gmail.com writes:
As far as I know hypothetical set function is used to do what-if
analysis. rank(val1) within group (order by sk1) chooses the rank
value so that val1 is equivalent to or just greater than sk1 when you
calculate rank() over (partition by group order
2010/2/1 Tom Lane t...@sss.pgh.pa.us:
Hitoshi Harada umi.tan...@gmail.com writes:
In other words, the queries can be the same:
SELECT array_agg(val ORDER BY sk) FROM ...
SELECT array_agg(val) WITHIN GROUP (ORDER BY sk) FROM ...
One more time: THOSE DON'T MEAN THE SAME THING. If we ever get
2010/1/30 Tom Lane t...@sss.pgh.pa.us:
Jonah H. Harris jonah.har...@gmail.com writes:
http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/functions087.htm
Defines:
*LISTAGG* (measure_expr [, 'delimiter_expr'])
*WITHIN GROUP* (order_by_clause) [*OVER* query_partition_clause]
Jonah H. Harris escribió:
The syntax is listagg(expression [, delimiter]) WITHIN GROUP (order by
clause) [OVER partition clause]
If a delimiter is defined, it must be a constant.
Query: SELECT listagg(a, ',') WITHIN GROUP (ORDER BY a) FROM foo;
Result: aaa,bbb,ccc
So that's how Oracle
Alvaro Herrera alvhe...@commandprompt.com writes:
So that's how Oracle supports ordered aggregates? Interesting -- we
just got that capability but using a different syntax. Hmm, the
SQL:200x draft also has within group specification which seems the
standard way to do the ORDER BY stuff for
On Fri, Jan 29, 2010 at 11:57 AM, Tom Lane t...@sss.pgh.pa.us wrote:
I find it doubtful that it's actually necessary in Oracle's version
of listagg ...
Eh?
http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/functions087.htm
Defines:
*LISTAGG* (measure_expr [, 'delimiter_expr'])
On Fri, Jan 29, 2010 at 12:09 PM, Jonah H. Harris jonah.har...@gmail.comwrote:
On Fri, Jan 29, 2010 at 11:57 AM, Tom Lane t...@sss.pgh.pa.us wrote:
I find it doubtful that it's actually necessary in Oracle's version
of listagg ...
Eh?
Jonah H. Harris jonah.har...@gmail.com writes:
http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/functions087.htm
Defines:
*LISTAGG* (measure_expr [, 'delimiter_expr'])
*WITHIN GROUP* (order_by_clause) [*OVER* query_partition_clause]
Hmph. I don't know what would possess