Skip to content

Commit 0beb011

Browse files
committed
Add GROUP BY spacing view test
1 parent 4ab83db commit 0beb011

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/sql/measures.test

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,21 @@ SELECT * FROM a;
5454
# Test: GROUP BY with extra spaces
5555
# =============================================================================
5656

57+
statement ok
58+
CREATE VIEW sales_grouped AS
59+
SELECT year, region, SUM(amount) AS MEASURE revenue
60+
FROM sales
61+
GROUP BY year, region;
62+
63+
query IIR rowsort
64+
SEMANTIC SELECT year, region, AGGREGATE(revenue) AT (ALL region) AS year_total
65+
FROM sales_grouped;
66+
----
67+
2022 EU 150.0
68+
2022 US 150.0
69+
2023 EU 225.0
70+
2023 US 225.0
71+
5772
query IIR rowsort
5873
SEMANTIC SELECT year, region, AGGREGATE(revenue) AT (ALL region) AS year_total
5974
FROM sales_v

0 commit comments

Comments
 (0)