1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
# name: test/sql/function/list/aggregates/hugeint.test
# description: Test hugeint aggregates
# group: [aggregates]
statement ok
CREATE TABLE hugeints(h HUGEINT[])
statement ok
INSERT INTO hugeints VALUES ([NULL, 1, 2]), (NULL), ([]), ([NULL]), ([1, 2, 3])
query III
SELECT list_first(h), list_last(h), list_sum(h) FROM hugeints
----
NULL 2 3
NULL NULL NULL
NULL NULL NULL
NULL NULL NULL
1 3 6
statement ok
DELETE FROM hugeints
statement ok
INSERT INTO hugeints VALUES ([42.0, 1267650600228229401496703205376, -439847238974238975238975, '-12']);
query IIIII
SELECT list_min(h), list_max(h), list_sum(h), list_first(h), list_last(h) FROM hugeints;
----
-439847238974238975238975 1267650600228229401496703205376 1267650160380990427257727966431 42 -12
|