mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Add more tests with window expressions
This commit is contained in:
parent
0663f07e67
commit
4d3ff7ee5e
@ -226,3 +226,29 @@ ORDER BY number ASC;
|
||||
97 52 52
|
||||
98 53 53
|
||||
99 54 54
|
||||
SELECT sum(number) / sum(sum(number)) OVER (PARTITION BY (number % 10))
|
||||
FROM numbers(10000)
|
||||
GROUP BY number % 10;
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
SELECT 1 + sum(number) / sum(sum(number)) OVER (PARTITION BY (number % 10))
|
||||
FROM numbers(10000)
|
||||
GROUP BY number % 10;
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
|
@ -18,3 +18,11 @@ SELECT
|
||||
avg(number) OVER (PARTITION BY number % 10)
|
||||
FROM numbers(100)
|
||||
ORDER BY number ASC;
|
||||
|
||||
SELECT sum(number) / sum(sum(number)) OVER (PARTITION BY (number % 10))
|
||||
FROM numbers(10000)
|
||||
GROUP BY number % 10;
|
||||
|
||||
SELECT 1 + sum(number) / sum(sum(number)) OVER (PARTITION BY (number % 10))
|
||||
FROM numbers(10000)
|
||||
GROUP BY number % 10;
|
||||
|
Loading…
Reference in New Issue
Block a user