提交 55cd7e22 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Add some tests

上级 dcc0ecbc
......@@ -83,3 +83,14 @@ SELECT I, V, COUNT(V) OVER W C, COUNT(DISTINCT V) OVER W D FROM
> 6 2 6 2
> 7 3 7 3
> rows (ordered): 7
SELECT I, C, COUNT(I) OVER (PARTITION BY C) CNT FROM
VALUES (1, 1), (2, 1), (3, 2), (4, 2), (5, 2) T(I, C);
> I C CNT
> - - ---
> 1 1 2
> 2 1 2
> 3 2 3
> 4 2 3
> 5 2 3
> rows: 5
......@@ -143,3 +143,11 @@ SELECT LAG(VALUE) OVER (ORDER BY ID RANGE CURRENT ROW) FROM TEST;
DROP TABLE TEST;
> ok
SELECT C, SUM(I) S, LEAD(SUM(I)) OVER (ORDER /**/ BY SUM(I)) L FROM
VALUES (1, 1), (2, 1), (4, 2), (8, 2) T(I, C) GROUP BY C;
> C S L
> - -- ----
> 1 3 12
> 2 12 null
> rows: 2
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论