create temp table gstest2 (a integer, b integer, c integer, d integer,
e integer, f integer, g integer, h integer);
copy gstest2 from stdin; 11111111 11111112 11111122 11111222 11112222 11122222 11222222 12222222 22222222
\.
create temp table gstest3 (a integer, b integer, c integer, d integer);
copy gstest3 from stdin; 1111 2222
\. altertable gstest3 addprimarykey (a);
create temp table gstest_empty (a integer, b integer, v integer);
create function gstest_data(v integer, out a integer, out b integer)
returns setof record as $f$
begin return query select v, i from generate_series(1,3) i;
end;
$f$ language plpgsql;
-- basic functionality
set enable_hashagg = false; -- test hashing explicitly later
-- simple rollup with multiple plain aggregates, with and without ordering -- (and with ordering differing from grouping)
select a, b, grouping(a,b), sum(v), count(*), max(v) from gstest1 groupby rollup (a,b); select a, b, grouping(a,b), sum(v), count(*), max(v) from gstest1 groupby rollup (a,b) orderby a,b; select a, b, grouping(a,b), sum(v), count(*), max(v) from gstest1 groupby rollup (a,b) orderby b desc, a; select a, b, grouping(a,b), sum(v), count(*), max(v) from gstest1 groupby rollup (a,b) orderby coalesce(a,0)+coalesce(b,0);
-- various types of ordered aggs select a, b, grouping(a,b),
array_agg(v orderby v),
string_agg(v::text, ':'orderby v desc),
percentile_disc(0.5) within group (orderby v),
rank(1,2,12) within group (orderby a,b,v) from gstest1 groupby rollup (a,b) orderby a,b;
-- test usage of grouped columns in direct args of aggs select grouping(a), a, array_agg(b),
rank(a) within group (orderby b nulls first),
rank(a) within group (orderby b nulls last) from (values (1,1),(1,4),(1,5),(3,1),(3,2)) v(a,b) groupby rollup (a) orderby a;
-- nesting with window functions select a, b, sum(c), sum(sum(c)) over (orderby a,b) as rsum from gstest2 groupby rollup (a,b) orderby rsum, a, b;
-- empty input: first is 0 rows, second 1, third 3 etc. select a, b, sum(v), count(*) from gstest_empty groupby grouping sets ((a,b),a); select a, b, sum(v), count(*) from gstest_empty groupby grouping sets ((a,b),()); select a, b, sum(v), count(*) from gstest_empty groupby grouping sets ((a,b),(),(),()); select sum(v), count(*) from gstest_empty groupby grouping sets ((),(),());
-- empty input with joins tests some important code paths select t1.a, t2.b, sum(t1.v), count(*) from gstest_empty t1, gstest_empty t2 groupby grouping sets ((t1.a,t2.b),());
-- simple joins, var resolution, GROUPING on join vars select t1.a, t2.b, grouping(t1.a, t2.b), sum(t1.v), max(t2.a) from gstest1 t1, gstest2 t2 groupby grouping sets ((t1.a, t2.b), ());
select a, b, grouping(a, b), sum(t1.v), max(t2.c) from gstest1 t1 join gstest2 t2 using (a,b) groupby grouping sets ((a, b), ());
-- check that functionally dependent cols are not nulled select a, d, grouping(a,b,c) from gstest3 groupby grouping sets ((a,b), (a,c));
-- check that distinct grouping columns are kept separate -- even if they are equal() explain (costs off) select g as alias1, g as alias2 from generate_series(1,3) g groupby alias1, rollup(alias2);
select g as alias1, g as alias2 from generate_series(1,3) g groupby alias1, rollup(alias2);
-- check that pulled-up subquery outputs still go to null when appropriate select four, x from (select four, ten, 'foo'::text as x from tenk1) as t groupby grouping sets (four, x) having x = 'foo';
select four, x || 'x' from (select four, ten, 'foo'::text as x from tenk1) as t groupby grouping sets (four, x) orderby four;
select (x+y)*1, sum(z) from (select1as x, 2as y, 3as z) s groupby grouping sets (x+y, x);
select x, not x as not_x, q2 from
(select *, q1 = 1as x from int8_tbl i1) as t groupby grouping sets(x, q2) orderby x, q2;
select x, y from (select four as x, four as y from tenk1) as t groupby grouping sets (x, y) having y isnull orderby1, 2;
select x, y || 'y' from (select four as x, four as y from tenk1) as t groupby grouping sets (x, y) orderby1, 2;
-- check that operands wrapped in PlaceHolderVars are capable of index matching
begin;
set local enable_bitmapscan = off;
explain (costs off) select x, y from (select unique1 as x, unique2 as y from tenk1) as t where x = 1 groupby grouping sets (x, y) orderby1, 2;
select x, y from (select unique1 as x, unique2 as y from tenk1) as t where x = 1 groupby grouping sets (x, y) orderby1, 2;
explain (costs off) select x, y from (select unique1::oid as x, unique2 as y from tenk1) as t where x::integer = 1 groupby grouping sets (x, y) orderby1, 2;
select x, y from (select unique1::oid as x, unique2 as y from tenk1) as t where x::integer = 1 groupby grouping sets (x, y) orderby1, 2;
explain (costs off) select x, y from (select t1.unique1 as x, t1.unique2 as y from tenk1 t1, tenk1 t2) as t where x = 1 groupby grouping sets (x, y) orderby1, 2;
select x, y from (select t1.unique1 as x, t1.unique2 as y from tenk1 t1, tenk1 t2) as t where x = 1 groupby grouping sets (x, y) orderby1, 2;
rollback;
-- check qual push-down rules for a subquery with grouping sets explain (verbose, costs off) select * from ( select1as x, q1, sum(q2) from int8_tbl i1 groupby grouping sets(1, 2)
) ss where x = 1and q1 = 123;
select * from ( select1as x, q1, sum(q2) from int8_tbl i1 groupby grouping sets(1, 2)
) ss where x = 1and q1 = 123;
-- check handling of pulled-up SubPlan in GROUPING() argument (bug #17479) explain (verbose, costs off) select grouping(ss.x) from int8_tbl i1 crossjoin lateral (select (select i1.q1) as x) ss groupby ss.x;
select grouping(ss.x) from int8_tbl i1 crossjoin lateral (select (select i1.q1) as x) ss groupby ss.x;
explain (verbose, costs off) select (select grouping(ss.x)) from int8_tbl i1 crossjoin lateral (select (select i1.q1) as x) ss groupby ss.x;
select (select grouping(ss.x)) from int8_tbl i1 crossjoin lateral (select (select i1.q1) as x) ss groupby ss.x;
-- simple rescan tests
select a, b, sum(v.x) from (values (1),(2)) v(x), gstest_data(v.x) groupby rollup (a,b);
select * from (values (1),(2)) v(x),
lateral (select a, b, sum(v.x) from gstest_data(v.x) groupby rollup (a,b)) s;
-- min max optimization should still work with GROUP BY () explain (costs off) select min(unique1) from tenk1 GROUPBY ();
-- Views with GROUPING SET queries CREATE VIEW gstest_view ASselect a, b, grouping(a,b), sum(c), count(*), max(c) from gstest2 groupby rollup ((a,b,c),(c,d));
-- Nested queries with 3 or more levels of nesting select(select (select grouping(a,b) from (values (1)) v2(c)) from (values (1,2)) v1(a,b) groupby (a,b)) from (values(6,7)) v3(e,f) GROUPBY ROLLUP(e,f); select(select (select grouping(e,f) from (values (1)) v2(c)) from (values (1,2)) v1(a,b) groupby (a,b)) from (values(6,7)) v3(e,f) GROUPBY ROLLUP(e,f); select(select (select grouping(c) from (values (1)) v2(c) GROUPBY c) from (values (1,2)) v1(a,b) groupby (a,b)) from (values(6,7)) v3(e,f) GROUPBY ROLLUP(e,f);
-- Combinations of operations select a, b, c, d from gstest2 groupby rollup(a,b),grouping sets(c,d); select a, b from (values (1,2),(2,3)) v(a,b) groupby a,b, grouping sets(a);
-- Tests for chained aggregates select a, b, grouping(a,b), sum(v), count(*), max(v) from gstest1 groupby grouping sets ((a,b),(a+1,b+1),(a+2,b+2)) orderby3,6; select(select (select grouping(a,b) from (values (1)) v2(c)) from (values (1,2)) v1(a,b) groupby (a,b)) from (values(6,7)) v3(e,f) GROUPBY ROLLUP((e+1),(f+1)); select(select (select grouping(a,b) from (values (1)) v2(c)) from (values (1,2)) v1(a,b) groupby (a,b)) from (values(6,7)) v3(e,f) GROUPBY CUBE((e+1),(f+1)) ORDERBY (e+1),(f+1); select a, b, sum(c), sum(sum(c)) over (orderby a,b) as rsum from gstest2 groupby cube (a,b) orderby rsum, a, b; select a, b, sum(c) from (values (1,1,10),(1,1,11),(1,2,12),(1,2,13),(1,3,14),(2,3,15),(3,3,16),(3,4,17),(4,1,18),(4,1,19)) v(a,b,c) groupby rollup (a,b); select a, b, sum(v.x) from (values (1),(2)) v(x), gstest_data(v.x) groupby cube (a,b) orderby a,b;
-- Test reordering of grouping sets explain (costs off) select * from gstest1 groupby grouping sets((a,b,v),(v)) orderby v,b,a;
-- Agg level check. This query should error out. select (select grouping(a,b) from gstest2) from gstest2 groupby a,b;
--Nested queries select a, b, sum(c), count(*) from gstest2 groupby grouping sets (rollup(a,b),a);
-- HAVING queries select ten, sum(distinct four) from onek a groupby grouping sets((ten,four),(ten)) havingexists (select1from onek b where sum(distinct a.four) = b.four);
-- Tests around pushdown of HAVING clauses, partially testing against previous bugs select a,count(*) from gstest2 groupby rollup(a) orderby a; select a,count(*) from gstest2 groupby rollup(a) having a isdistinctfrom1orderby a; explain (costs off) select a,count(*) from gstest2 groupby rollup(a) having a isdistinctfrom1orderby a;
select v.c, (select count(*) from gstest2 groupby () having v.c) from (values (false),(true)) v(c) orderby v.c; explain (costs off) select v.c, (select count(*) from gstest2 groupby () having v.c) from (values (false),(true)) v(c) orderby v.c;
-- test pushdown of non-degenerate HAVING clause that does not reference any -- columns that are nullable by grouping sets explain (costs off) select a, b, count(*) from gstest2 groupby grouping sets ((a, b), (a)) having a > 1and b > 1; select a, b, count(*) from gstest2 groupby grouping sets ((a, b), (a)) having a > 1and b > 1;
explain (costs off) select a, b, count(*) from gstest2 groupby rollup(a), b having b > 1; select a, b, count(*) from gstest2 groupby rollup(a), b having b > 1;
-- test pushdown of degenerate HAVING clause explain (costs off) select count(*) from gstest2 groupby grouping sets (()) havingfalse; select count(*) from gstest2 groupby grouping sets (()) havingfalse;
explain (costs off) select a, count(*) from gstest2 groupby grouping sets ((a), ()) havingfalse; select a, count(*) from gstest2 groupby grouping sets ((a), ()) havingfalse;
explain (costs off) select a, b, count(*) from gstest2 groupby grouping sets ((a), (b)) havingfalse; select a, b, count(*) from gstest2 groupby grouping sets ((a), (b)) havingfalse;
-- HAVING with GROUPING queries select ten, grouping(ten) from onek groupby grouping sets(ten) having grouping(ten) >= 0 orderby2,1; select ten, grouping(ten) from onek groupby grouping sets(ten, four) having grouping(ten) > 0 orderby2,1; select ten, grouping(ten) from onek groupby rollup(ten) having grouping(ten) > 0 orderby2,1; select ten, grouping(ten) from onek groupby cube(ten) having grouping(ten) > 0 orderby2,1; select ten, grouping(ten) from onek groupby (ten) having grouping(ten) >= 0 orderby2,1;
-- FILTER queries select ten, sum(distinct four) filter (where four::text ~ '123') from onek a groupby rollup(ten);
-- More rescan tests select * from (values (1),(2)) v(a) leftjoin lateral (select v.a, four, ten, count(*) from onek groupby cube(four,ten)) s ontrueorderby v.a,four,ten; select array(select row(v.a,s1.*) from (select two,four, count(*) from onek groupby cube(two,four) orderby two,four) s1) from (values (1),(2)) v(a);
-- Grouping on text columns select sum(ten) from onek groupby two, rollup(four::text) orderby1; select sum(ten) from onek groupby rollup(four::text), two orderby1;
-- hashing support
set enable_hashagg = true;
-- failure cases
select count(*) from gstest4 groupby rollup(unhashable_col,unsortable_col); select array_agg(v orderby v) from gstest4 groupby grouping sets ((id,unsortable_col),(id));
-- simple cases
select a, b, grouping(a,b), sum(v), count(*), max(v) from gstest1 groupby grouping sets ((a),(b)) orderby3,1,2; explain (costs off) select a, b, grouping(a,b), sum(v), count(*), max(v) from gstest1 groupby grouping sets ((a),(b)) orderby3,1,2;
select a, b, grouping(a,b), sum(v), count(*), max(v) from gstest1 groupby cube(a,b) orderby3,1,2; explain (costs off) select a, b, grouping(a,b), sum(v), count(*), max(v) from gstest1 groupby cube(a,b) orderby3,1,2;
-- shouldn't try and hash explain (costs off) select a, b, grouping(a,b), array_agg(v orderby v) from gstest1 groupby cube(a,b);
-- empty input: first is 0 rows, second 1, third 3 etc. select a, b, sum(v), count(*) from gstest_empty groupby grouping sets ((a,b),a); explain (costs off) select a, b, sum(v), count(*) from gstest_empty groupby grouping sets ((a,b),a); select a, b, sum(v), count(*) from gstest_empty groupby grouping sets ((a,b),()); select a, b, sum(v), count(*) from gstest_empty groupby grouping sets ((a,b),(),(),()); explain (costs off) select a, b, sum(v), count(*) from gstest_empty groupby grouping sets ((a,b),(),(),()); select sum(v), count(*) from gstest_empty groupby grouping sets ((),(),()); explain (costs off) select sum(v), count(*) from gstest_empty groupby grouping sets ((),(),());
-- check that functionally dependent cols are not nulled select a, d, grouping(a,b,c) from gstest3 groupby grouping sets ((a,b), (a,c)); explain (costs off) select a, d, grouping(a,b,c) from gstest3 groupby grouping sets ((a,b), (a,c));
-- simple rescan tests
select a, b, sum(v.x) from (values (1),(2)) v(x), gstest_data(v.x) groupby grouping sets (a,b) orderby1, 2, 3; explain (costs off) select a, b, sum(v.x) from (values (1),(2)) v(x), gstest_data(v.x) groupby grouping sets (a,b) orderby3, 1, 2; select * from (values (1),(2)) v(x),
lateral (select a, b, sum(v.x) from gstest_data(v.x) groupby grouping sets (a,b)) s; explain (costs off) select * from (values (1),(2)) v(x),
lateral (select a, b, sum(v.x) from gstest_data(v.x) groupby grouping sets (a,b)) s;
-- Tests for chained aggregates select a, b, grouping(a,b), sum(v), count(*), max(v) from gstest1 groupby grouping sets ((a,b),(a+1,b+1),(a+2,b+2)) orderby3,6; explain (costs off) select a, b, grouping(a,b), sum(v), count(*), max(v) from gstest1 groupby grouping sets ((a,b),(a+1,b+1),(a+2,b+2)) orderby3,6; select a, b, sum(c), sum(sum(c)) over (orderby a,b) as rsum from gstest2 groupby cube (a,b) orderby rsum, a, b; explain (costs off) select a, b, sum(c), sum(sum(c)) over (orderby a,b) as rsum from gstest2 groupby cube (a,b) orderby rsum, a, b; select a, b, sum(v.x) from (values (1),(2)) v(x), gstest_data(v.x) groupby cube (a,b) orderby a,b; explain (costs off) select a, b, sum(v.x) from (values (1),(2)) v(x), gstest_data(v.x) groupby cube (a,b) orderby a,b;
-- Verify that we correctly handle the child node returning a -- non-minimal slot, which happens if the input is pre-sorted, -- e.g. due to an index scan.
BEGIN; SET LOCAL enable_hashagg = false; EXPLAIN (COSTS OFF) SELECT a, b, count(*), max(a), max(b) FROM gstest3 GROUPBY GROUPING SETS(a, b,()) ORDERBY a, b; SELECT a, b, count(*), max(a), max(b) FROM gstest3 GROUPBY GROUPING SETS(a, b,()) ORDERBY a, b; SET LOCAL enable_seqscan = false; EXPLAIN (COSTS OFF) SELECT a, b, count(*), max(a), max(b) FROM gstest3 GROUPBY GROUPING SETS(a, b,()) ORDERBY a, b; SELECT a, b, count(*), max(a), max(b) FROM gstest3 GROUPBY GROUPING SETS(a, b,()) ORDERBY a, b; COMMIT;
-- More rescan tests select * from (values (1),(2)) v(a) leftjoin lateral (select v.a, four, ten, count(*) from onek groupby cube(four,ten)) s ontrueorderby v.a,four,ten; select array(select row(v.a,s1.*) from (select two,four, count(*) from onek groupby cube(two,four) orderby two,four) s1) from (values (1),(2)) v(a);
-- Rescan logic changes when there are no empty grouping sets, so test -- that too: select * from (values (1),(2)) v(a) leftjoin lateral (select v.a, four, ten, count(*) from onek groupby grouping sets(four,ten)) s ontrueorderby v.a,four,ten; select array(select row(v.a,s1.*) from (select two,four, count(*) from onek groupby grouping sets(two,four) orderby two,four) s1) from (values (1),(2)) v(a);
-- test the knapsack
set enable_indexscan = false; set hash_mem_multiplier = 1.0; set work_mem = '64kB'; explain (costs off) select unique1,
count(two), count(four), count(ten),
count(hundred), count(thousand), count(twothousand),
count(*) from tenk1 groupby grouping sets (unique1,twothousand,thousand,hundred,ten,four,two); explain (costs off) select unique1,
count(two), count(four), count(ten),
count(hundred), count(thousand), count(twothousand),
count(*) from tenk1 groupby grouping sets (unique1,hundred,ten,four,two);
-- check collation-sensitive matching between grouping expressions -- (similar to a check for aggregates, but there are additional code -- paths for GROUPING, so check again here)
insertinto bug_16784 select g/10, g from generate_series(1,40) g;
set work_mem='64kB'; set enable_sort = false;
select * from
(values (1),(2)) v(a),
lateral (select a, i, j, count(*) from
bug_16784 groupby cube(i,j)) s orderby v.a, i, j;
-- -- Compare results between plans using sorting and plans using hash -- aggregation. Force spilling in both cases by setting work_mem low -- and altering the statistics. --
createtable gs_data_1 as select g%1000as g1000, g%100as g100, g%10as g10, g from generate_series(0,1999) g;
analyze gs_data_1; altertable gs_data_1 set (autovacuum_enabled = 'false'); update pg_class set reltuples = 10where relname='gs_data_1';
set work_mem='64kB';
-- Produce results with sorting.
set enable_sort = true; set enable_hashagg = false; set jit_above_cost = 0;
createtable gs_hash_1 as select g100, g10, sum(g::numeric), count(*), max(g::text) from gs_data_1 groupby cube (g1000, g100,g10);
set enable_sort = true; set work_mem todefault; set hash_mem_multiplier todefault;
-- Compare results
(select * from gs_hash_1 except select * from gs_group_1) unionall
(select * from gs_group_1 except select * from gs_hash_1);
droptable gs_group_1; droptable gs_hash_1;
-- GROUP BY DISTINCT
-- "normal" behavior... select a, b, c from (values (1, 2, 3), (4, null, 6), (7, 8, 9)) as t (a, b, c) groupbyall rollup(a, b), rollup(a, c) orderby a, b, c;
-- ...which is also the default select a, b, c from (values (1, 2, 3), (4, null, 6), (7, 8, 9)) as t (a, b, c) groupby rollup(a, b), rollup(a, c) orderby a, b, c;
-- "group by distinct" behavior... select a, b, c from (values (1, 2, 3), (4, null, 6), (7, 8, 9)) as t (a, b, c) groupbydistinct rollup(a, b), rollup(a, c) orderby a, b, c;
-- ...which is not the same as "select distinct" selectdistinct a, b, c from (values (1, 2, 3), (4, null, 6), (7, 8, 9)) as t (a, b, c) groupby rollup(a, b), rollup(a, c) orderby a, b, c;
-- test handling of outer GroupingFunc within subqueries explain (costs off) select (select grouping(v1)) from (values ((select1))) v(v1) groupby cube(v1); select (select grouping(v1)) from (values ((select1))) v(v1) groupby cube(v1);
-- test handling of subqueries in grouping sets create temp table gstest5(id integerprimarykey, v integer); insertinto gstest5 select i, i from generate_series(1,5)i;
explain (verbose, costs off) select grouping((select t1.v from gstest5 t2 where id = t1.id)),
(select t1.v from gstest5 t2 where id = t1.id) as s from gstest5 t1 groupby grouping sets(v, s) orderbycasewhen grouping((select t1.v from gstest5 t2 where id = t1.id)) = 0 then (select t1.v from gstest5 t2 where id = t1.id) elsenull end
nulls first;
select grouping((select t1.v from gstest5 t2 where id = t1.id)),
(select t1.v from gstest5 t2 where id = t1.id) as s from gstest5 t1 groupby grouping sets(v, s) orderbycasewhen grouping((select t1.v from gstest5 t2 where id = t1.id)) = 0 then (select t1.v from gstest5 t2 where id = t1.id) elsenull end
nulls first;
explain (verbose, costs off) select grouping((select t1.v from gstest5 t2 where id = t1.id)),
(select t1.v from gstest5 t2 where id = t1.id) as s, casewhen grouping((select t1.v from gstest5 t2 where id = t1.id)) = 0 then (select t1.v from gstest5 t2 where id = t1.id) elsenull end as o from gstest5 t1 groupby grouping sets(v, s) orderby o nulls first;
select grouping((select t1.v from gstest5 t2 where id = t1.id)),
(select t1.v from gstest5 t2 where id = t1.id) as s, casewhen grouping((select t1.v from gstest5 t2 where id = t1.id)) = 0 then (select t1.v from gstest5 t2 where id = t1.id) elsenull end as o from gstest5 t1 groupby grouping sets(v, s) orderby o nulls first;
-- test handling of expressions that should match lower target items explain (costs off) select a < b and b < 3from (values (1, 2)) t(a, b) groupby rollup(a < b and b < 3) having a < b and b < 3; select a < b and b < 3from (values (1, 2)) t(a, b) groupby rollup(a < b and b < 3) having a < b and b < 3;
explain (costs off) selectnot a from (values(true)) t(a) groupby rollup(not a) havingnotnot a; selectnot a from (values(true)) t(a) groupby rollup(not a) havingnotnot a;
-- test handling of expressions nullable by grouping sets explain (costs off) selectdistincton (a, b) a, b from (values (1, 1), (2, 2)) as t (a, b) where a = b groupby grouping sets((a, b), (a)) orderby a, b;
selectdistincton (a, b) a, b from (values (1, 1), (2, 2)) as t (a, b) where a = b groupby grouping sets((a, b), (a)) orderby a, b;
explain (costs off) selectdistincton (a, b+1) a, b+1 from (values (1, 0), (2, 1)) as t (a, b) where a = b+1 groupby grouping sets((a, b+1), (a)) orderby a, b+1;
selectdistincton (a, b+1) a, b+1 from (values (1, 0), (2, 1)) as t (a, b) where a = b+1 groupby grouping sets((a, b+1), (a)) orderby a, b+1;
explain (costs off) select a, b from (values (1, 1), (2, 2)) as t (a, b) where a = b groupby grouping sets((a, b), (a)) orderby a, b nulls first;
select a, b from (values (1, 1), (2, 2)) as t (a, b) where a = b groupby grouping sets((a, b), (a)) orderby a, b nulls first;
explain (costs off) select1as one groupby rollup(one) orderby one nulls first; select1as one groupby rollup(one) orderby one nulls first;
explain (costs off) select a, b, row_number() over (orderby a, b nulls first) from (values (1, 1), (2, 2)) as t (a, b) where a = b groupby grouping sets((a, b), (a));
select a, b, row_number() over (orderby a, b nulls first) from (values (1, 1), (2, 2)) as t (a, b) where a = b groupby grouping sets((a, b), (a));
-- test handling of SRFs with grouping sets explain (verbose, costs off) select generate_series(1, a) as g from (values (1, 1), (2, 2)) as t (a, b) groupby rollup(g) orderby1;
select generate_series(1, a) as g from (values (1, 1), (2, 2)) as t (a, b) groupby rollup(g) orderby1;
explain (verbose, costs off) select generate_series(1, a) as g, a+b as ab from (values (1, 1), (2, 2)) as t (a, b) groupby rollup(a, ab) orderby1, 2;
select generate_series(1, a) as g, a+b as ab from (values (1, 1), (2, 2)) as t (a, b) groupby rollup(a, ab) orderby1, 2;
-- end
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.17 Sekunden
(vorverarbeitet am 2026-08-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.