aboutsummaryrefslogtreecommitdiff
path: root/sql/core/src/test/resources/sql-tests/results/grouping_set.sql.out
blob: edb38a52b7514f80f772f181622f21fa2e65bf9b (plain) (blame)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
-- Automatically generated by SQLQueryTestSuite
-- Number of queries: 4


-- !query 0
CREATE TEMPORARY VIEW grouping AS SELECT * FROM VALUES
  ("1", "2", "3", 1),
  ("4", "5", "6", 1),
  ("7", "8", "9", 1)
  as grouping(a, b, c, d)
-- !query 0 schema
struct<>
-- !query 0 output



-- !query 1
SELECT a, b, c, count(d) FROM grouping GROUP BY a, b, c GROUPING SETS (())
-- !query 1 schema
struct<a:string,b:string,c:string,count(d):bigint>
-- !query 1 output
NULL	NULL	NULL	3


-- !query 2
SELECT a, b, c, count(d) FROM grouping GROUP BY a, b, c GROUPING SETS ((a))
-- !query 2 schema
struct<a:string,b:string,c:string,count(d):bigint>
-- !query 2 output
1	NULL	NULL	1
4	NULL	NULL	1
7	NULL	NULL	1


-- !query 3
SELECT a, b, c, count(d) FROM grouping GROUP BY a, b, c GROUPING SETS ((c))
-- !query 3 schema
struct<a:string,b:string,c:string,count(d):bigint>
-- !query 3 output
NULL	NULL	3	1
NULL	NULL	6	1
NULL	NULL	9	1