2019-03-08 23:57:05 +03:00
|
|
|
# 2019 March 01
|
|
|
|
#
|
|
|
|
# The author disclaims copyright to this source code. In place of
|
|
|
|
# a legal notice, here is a blessing:
|
|
|
|
#
|
|
|
|
# May you do good and not evil.
|
|
|
|
# May you find forgiveness for yourself and forgive others.
|
|
|
|
# May you share freely, never taking more than you give.
|
|
|
|
#
|
|
|
|
#***********************************************************************
|
|
|
|
# This file implements regression tests for SQLite library.
|
|
|
|
#
|
|
|
|
|
|
|
|
####################################################
|
|
|
|
# DO NOT EDIT! THIS FILE IS AUTOMATICALLY GENERATED!
|
|
|
|
####################################################
|
|
|
|
|
|
|
|
set testdir [file dirname $argv0]
|
|
|
|
source $testdir/tester.tcl
|
|
|
|
set testprefix window8
|
|
|
|
|
|
|
|
ifcapable !windowfunc { finish_test ; return }
|
|
|
|
do_execsql_test 1.0 {
|
|
|
|
DROP TABLE IF EXISTS t3;
|
|
|
|
CREATE TABLE t3(a TEXT, b TEXT, c INTEGER);
|
|
|
|
INSERT INTO t3 VALUES
|
|
|
|
('HH', 'bb', 355), ('CC', 'aa', 158), ('BB', 'aa', 399),
|
|
|
|
('FF', 'bb', 938), ('HH', 'aa', 480), ('FF', 'bb', 870),
|
|
|
|
('JJ', 'aa', 768), ('JJ', 'aa', 899), ('GG', 'bb', 929),
|
|
|
|
('II', 'bb', 421), ('GG', 'bb', 844), ('FF', 'bb', 574),
|
|
|
|
('CC', 'bb', 822), ('GG', 'bb', 938), ('BB', 'aa', 660),
|
|
|
|
('HH', 'aa', 979), ('BB', 'bb', 792), ('DD', 'aa', 845),
|
|
|
|
('JJ', 'bb', 354), ('FF', 'bb', 295), ('JJ', 'aa', 234),
|
|
|
|
('BB', 'bb', 840), ('AA', 'aa', 934), ('EE', 'aa', 113),
|
|
|
|
('AA', 'bb', 309), ('BB', 'aa', 412), ('AA', 'aa', 911),
|
|
|
|
('AA', 'bb', 572), ('II', 'aa', 398), ('II', 'bb', 250),
|
|
|
|
('II', 'aa', 652), ('BB', 'bb', 633), ('AA', 'aa', 239),
|
|
|
|
('FF', 'aa', 670), ('BB', 'bb', 705), ('HH', 'bb', 963),
|
|
|
|
('CC', 'bb', 346), ('II', 'bb', 671), ('BB', 'aa', 247),
|
|
|
|
('AA', 'aa', 223), ('GG', 'aa', 480), ('HH', 'aa', 790),
|
|
|
|
('FF', 'aa', 208), ('BB', 'bb', 711), ('EE', 'aa', 777),
|
|
|
|
('DD', 'bb', 716), ('CC', 'aa', 759), ('CC', 'aa', 430),
|
|
|
|
('CC', 'aa', 607), ('DD', 'bb', 794), ('GG', 'aa', 148),
|
|
|
|
('GG', 'aa', 634), ('JJ', 'bb', 257), ('DD', 'bb', 959),
|
|
|
|
('FF', 'bb', 726), ('BB', 'aa', 762), ('JJ', 'bb', 336),
|
|
|
|
('GG', 'aa', 335), ('HH', 'bb', 330), ('GG', 'bb', 160),
|
|
|
|
('JJ', 'bb', 839), ('FF', 'aa', 618), ('BB', 'aa', 393),
|
|
|
|
('EE', 'bb', 629), ('FF', 'aa', 667), ('AA', 'bb', 870),
|
|
|
|
('FF', 'bb', 102), ('JJ', 'aa', 113), ('DD', 'aa', 224),
|
|
|
|
('AA', 'bb', 627), ('HH', 'bb', 730), ('II', 'bb', 443),
|
|
|
|
('HH', 'bb', 133), ('EE', 'bb', 252), ('II', 'bb', 805),
|
|
|
|
('BB', 'bb', 786), ('EE', 'bb', 768), ('HH', 'bb', 683),
|
|
|
|
('DD', 'bb', 238), ('DD', 'aa', 256);
|
|
|
|
} {}
|
|
|
|
|
|
|
|
do_execsql_test 1.1.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685
|
|
|
|
BB aa 4685 BB bb 4685 BB bb 4685 BB bb 4685 BB bb 4685 BB bb 4685
|
|
|
|
BB bb 4685 CC aa 12025 CC aa 12025 CC aa 12025 CC aa 12025
|
|
|
|
CC bb 12025 CC bb 12025 DD aa 15147 DD aa 15147 DD aa 15147
|
|
|
|
DD bb 15147 DD bb 15147 DD bb 15147 DD bb 15147 EE aa 19179
|
|
|
|
EE aa 19179 EE bb 19179 EE bb 19179 EE bb 19179 FF aa 21718
|
|
|
|
FF aa 21718 FF aa 21718 FF aa 21718 FF bb 21718 FF bb 21718
|
|
|
|
FF bb 21718 FF bb 21718 FF bb 21718 FF bb 21718 GG aa 27386
|
|
|
|
GG aa 27386 GG aa 27386 GG aa 27386 GG bb 27386 GG bb 27386
|
|
|
|
GG bb 27386 GG bb 27386 HH aa 31854 HH aa 31854 HH aa 31854
|
|
|
|
HH bb 31854 HH bb 31854 HH bb 31854 HH bb 31854 HH bb 31854
|
|
|
|
HH bb 31854 II aa 37297 II aa 37297 II bb 37297 II bb 37297
|
|
|
|
II bb 37297 II bb 37297 II bb 37297 JJ aa 40937 JJ aa 40937
|
|
|
|
JJ aa 40937 JJ aa 40937 JJ bb 40937 JJ bb 40937 JJ bb 40937
|
|
|
|
JJ bb 40937}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.1.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb 2307 AA bb 2307
|
|
|
|
AA bb 2307 AA bb 2307 BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685
|
|
|
|
BB aa 4685 BB aa 4685 BB bb 7558 BB bb 7558 BB bb 7558 BB bb 7558
|
|
|
|
BB bb 7558 BB bb 7558 CC aa 12025 CC aa 12025 CC aa 12025
|
|
|
|
CC aa 12025 CC bb 13979 CC bb 13979 DD aa 15147 DD aa 15147
|
|
|
|
DD aa 15147 DD bb 16472 DD bb 16472 DD bb 16472 DD bb 16472
|
|
|
|
EE aa 19179 EE aa 19179 EE bb 20069 EE bb 20069 EE bb 20069
|
|
|
|
FF aa 21718 FF aa 21718 FF aa 21718 FF aa 21718 FF bb 23881
|
|
|
|
FF bb 23881 FF bb 23881 FF bb 23881 FF bb 23881 FF bb 23881
|
|
|
|
GG aa 27386 GG aa 27386 GG aa 27386 GG aa 27386 GG bb 28983
|
|
|
|
GG bb 28983 GG bb 28983 GG bb 28983 HH aa 31854 HH aa 31854
|
|
|
|
HH aa 31854 HH bb 34103 HH bb 34103 HH bb 34103 HH bb 34103
|
|
|
|
HH bb 34103 HH bb 34103 II aa 37297 II aa 37297 II bb 38347
|
|
|
|
II bb 38347 II bb 38347 II bb 38347 II bb 38347 JJ aa 40937
|
|
|
|
JJ aa 40937 JJ aa 40937 JJ aa 40937 JJ bb 42951 JJ bb 42951
|
|
|
|
JJ bb 42951 JJ bb 42951}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.1.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.1.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb 934 AA bb 934
|
|
|
|
AA bb 934 AA bb 934 BB aa 934 BB aa 934 BB aa 934 BB aa 934
|
|
|
|
BB aa 934 BB aa 934 BB bb 934 BB bb 934 BB bb 934 BB bb 934
|
|
|
|
BB bb 934 BB bb 934 CC aa 934 CC aa 934 CC aa 934 CC aa 934
|
|
|
|
CC bb 934 CC bb 934 DD aa 934 DD aa 934 DD aa 934 DD bb 934
|
|
|
|
DD bb 934 DD bb 934 DD bb 934 EE aa 959 EE aa 959 EE bb 959
|
|
|
|
EE bb 959 EE bb 959 FF aa 959 FF aa 959 FF aa 959 FF aa 959
|
|
|
|
FF bb 959 FF bb 959 FF bb 959 FF bb 959 FF bb 959 FF bb 959
|
|
|
|
GG aa 959 GG aa 959 GG aa 959 GG aa 959 GG bb 959 GG bb 959
|
|
|
|
GG bb 959 GG bb 959 HH aa 959 HH aa 959 HH aa 959 HH bb 979
|
|
|
|
HH bb 979 HH bb 979 HH bb 979 HH bb 979 HH bb 979 II aa 979
|
|
|
|
II aa 979 II bb 979 II bb 979 II bb 979 II bb 979 II bb 979
|
|
|
|
JJ aa 979 JJ aa 979 JJ aa 979 JJ aa 979 JJ bb 979 JJ bb 979
|
|
|
|
JJ bb 979 JJ bb 979}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.1.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb 223 AA bb 223
|
|
|
|
AA bb 223 AA bb 223 BB aa 223 BB aa 223 BB aa 223 BB aa 223
|
|
|
|
BB aa 223 BB aa 223 BB bb 223 BB bb 223 BB bb 223 BB bb 223
|
|
|
|
BB bb 223 BB bb 223 CC aa 223 CC aa 223 CC aa 223 CC aa 223
|
|
|
|
CC bb 158 CC bb 158 DD aa 158 DD aa 158 DD aa 158 DD bb 158
|
|
|
|
DD bb 158 DD bb 158 DD bb 158 EE aa 158 EE aa 158 EE bb 113
|
|
|
|
EE bb 113 EE bb 113 FF aa 113 FF aa 113 FF aa 113 FF aa 113
|
|
|
|
FF bb 113 FF bb 113 FF bb 113 FF bb 113 FF bb 113 FF bb 113
|
|
|
|
GG aa 102 GG aa 102 GG aa 102 GG aa 102 GG bb 102 GG bb 102
|
|
|
|
GG bb 102 GG bb 102 HH aa 102 HH aa 102 HH aa 102 HH bb 102
|
|
|
|
HH bb 102 HH bb 102 HH bb 102 HH bb 102 HH bb 102 II aa 102
|
|
|
|
II aa 102 II bb 102 II bb 102 II bb 102 II bb 102 II bb 102
|
|
|
|
JJ aa 102 JJ aa 102 JJ aa 102 JJ aa 102 JJ bb 102 JJ bb 102
|
|
|
|
JJ bb 102 JJ bb 102}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.1.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685
|
|
|
|
BB aa 4685 BB bb 4685 BB bb 4685 BB bb 4685 BB bb 4685 BB bb 4685
|
|
|
|
BB bb 4685 CC aa 12025 CC aa 12025 CC aa 12025 CC aa 12025
|
|
|
|
CC bb 12025 CC bb 12025 DD aa 15147 DD aa 15147 DD aa 15147
|
|
|
|
DD bb 15147 DD bb 15147 DD bb 15147 DD bb 15147 EE aa 19179
|
|
|
|
EE aa 19179 EE bb 19179 EE bb 19179 EE bb 19179 FF aa 21718
|
|
|
|
FF aa 21718 FF aa 21718 FF aa 21718 FF bb 21718 FF bb 21718
|
|
|
|
FF bb 21718 FF bb 21718 FF bb 21718 FF bb 21718 GG aa 27386
|
|
|
|
GG aa 27386 GG aa 27386 GG aa 27386 GG bb 27386 GG bb 27386
|
|
|
|
GG bb 27386 GG bb 27386 HH aa 31854 HH aa 31854 HH aa 31854
|
|
|
|
HH bb 31854 HH bb 31854 HH bb 31854 HH bb 31854 HH bb 31854
|
|
|
|
HH bb 31854 II aa 37297 II aa 37297 II bb 37297 II bb 37297
|
|
|
|
II bb 37297 II bb 37297 II bb 37297 JJ aa 40937 JJ aa 40937
|
|
|
|
JJ aa 40937 JJ aa 40937 JJ bb 40937 JJ bb 40937 JJ bb 40937
|
|
|
|
JJ bb 40937}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.1.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb 2307 AA bb 2307
|
|
|
|
AA bb 2307 AA bb 2307 BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685
|
|
|
|
BB aa 4685 BB aa 4685 BB bb 7558 BB bb 7558 BB bb 7558 BB bb 7558
|
|
|
|
BB bb 7558 BB bb 7558 CC aa 12025 CC aa 12025 CC aa 12025
|
|
|
|
CC aa 12025 CC bb 13979 CC bb 13979 DD aa 15147 DD aa 15147
|
|
|
|
DD aa 15147 DD bb 16472 DD bb 16472 DD bb 16472 DD bb 16472
|
|
|
|
EE aa 19179 EE aa 19179 EE bb 20069 EE bb 20069 EE bb 20069
|
|
|
|
FF aa 21718 FF aa 21718 FF aa 21718 FF aa 21718 FF bb 23881
|
|
|
|
FF bb 23881 FF bb 23881 FF bb 23881 FF bb 23881 FF bb 23881
|
|
|
|
GG aa 27386 GG aa 27386 GG aa 27386 GG aa 27386 GG bb 28983
|
|
|
|
GG bb 28983 GG bb 28983 GG bb 28983 HH aa 31854 HH aa 31854
|
|
|
|
HH aa 31854 HH bb 34103 HH bb 34103 HH bb 34103 HH bb 34103
|
|
|
|
HH bb 34103 HH bb 34103 II aa 37297 II aa 37297 II bb 38347
|
|
|
|
II bb 38347 II bb 38347 II bb 38347 II bb 38347 JJ aa 40937
|
|
|
|
JJ aa 40937 JJ aa 40937 JJ aa 40937 JJ bb 42951 JJ bb 42951
|
|
|
|
JJ bb 42951 JJ bb 42951}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.1.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa {} {} {} {} AA aa {} {} {} {} AA aa {} {} {} {}
|
|
|
|
AA aa {} {} {} {} AA bb {} {} 2307 2307 AA bb {} {} 2307 2307
|
|
|
|
AA bb {} {} 2307 2307 AA bb {} {} 2307 2307 BB aa 4685 4685 4685 4685
|
|
|
|
BB aa 4685 4685 4685 4685 BB aa 4685 4685 4685 4685
|
|
|
|
BB aa 4685 4685 4685 4685 BB aa 4685 4685 4685 4685
|
|
|
|
BB aa 4685 4685 4685 4685 BB bb 4685 4685 7558 7558
|
|
|
|
BB bb 4685 4685 7558 7558 BB bb 4685 4685 7558 7558
|
|
|
|
BB bb 4685 4685 7558 7558 BB bb 4685 4685 7558 7558
|
|
|
|
BB bb 4685 4685 7558 7558 CC aa 12025 12025 12025 12025
|
|
|
|
CC aa 12025 12025 12025 12025 CC aa 12025 12025 12025 12025
|
|
|
|
CC aa 12025 12025 12025 12025 CC bb 12025 12025 13979 13979
|
|
|
|
CC bb 12025 12025 13979 13979 DD aa 15147 15147 15147 15147
|
|
|
|
DD aa 15147 15147 15147 15147 DD aa 15147 15147 15147 15147
|
|
|
|
DD bb 15147 15147 16472 16472 DD bb 15147 15147 16472 16472
|
|
|
|
DD bb 15147 15147 16472 16472 DD bb 15147 15147 16472 16472
|
|
|
|
EE aa 19179 19179 19179 19179 EE aa 19179 19179 19179 19179
|
|
|
|
EE bb 19179 19179 20069 20069 EE bb 19179 19179 20069 20069
|
|
|
|
EE bb 19179 19179 20069 20069 FF aa 21718 21718 21718 21718
|
|
|
|
FF aa 21718 21718 21718 21718 FF aa 21718 21718 21718 21718
|
|
|
|
FF aa 21718 21718 21718 21718 FF bb 21718 21718 23881 23881
|
|
|
|
FF bb 21718 21718 23881 23881 FF bb 21718 21718 23881 23881
|
|
|
|
FF bb 21718 21718 23881 23881 FF bb 21718 21718 23881 23881
|
|
|
|
FF bb 21718 21718 23881 23881 GG aa 27386 27386 27386 27386
|
|
|
|
GG aa 27386 27386 27386 27386 GG aa 27386 27386 27386 27386
|
|
|
|
GG aa 27386 27386 27386 27386 GG bb 27386 27386 28983 28983
|
|
|
|
GG bb 27386 27386 28983 28983 GG bb 27386 27386 28983 28983
|
|
|
|
GG bb 27386 27386 28983 28983 HH aa 31854 31854 31854 31854
|
|
|
|
HH aa 31854 31854 31854 31854 HH aa 31854 31854 31854 31854
|
|
|
|
HH bb 31854 31854 34103 34103 HH bb 31854 31854 34103 34103
|
|
|
|
HH bb 31854 31854 34103 34103 HH bb 31854 31854 34103 34103
|
|
|
|
HH bb 31854 31854 34103 34103 HH bb 31854 31854 34103 34103
|
|
|
|
II aa 37297 37297 37297 37297 II aa 37297 37297 37297 37297
|
|
|
|
II bb 37297 37297 38347 38347 II bb 37297 37297 38347 38347
|
|
|
|
II bb 37297 37297 38347 38347 II bb 37297 37297 38347 38347
|
|
|
|
II bb 37297 37297 38347 38347 JJ aa 40937 40937 40937 40937
|
|
|
|
JJ aa 40937 40937 40937 40937 JJ aa 40937 40937 40937 40937
|
|
|
|
JJ aa 40937 40937 40937 40937 JJ bb 40937 40937 42951 42951
|
|
|
|
JJ bb 40937 40937 42951 42951 JJ bb 40937 40937 42951 42951
|
|
|
|
JJ bb 40937 40937 42951 42951}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.2.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 4685 AA aa 4685 AA aa 4685 AA aa 4685 AA bb 4685 AA bb 4685
|
|
|
|
AA bb 4685 AA bb 4685 BB aa 12025 BB aa 12025 BB aa 12025
|
|
|
|
BB aa 12025 BB aa 12025 BB aa 12025 BB bb 12025 BB bb 12025
|
|
|
|
BB bb 12025 BB bb 12025 BB bb 12025 BB bb 12025 CC aa 15147
|
|
|
|
CC aa 15147 CC aa 15147 CC aa 15147 CC bb 15147 CC bb 15147
|
|
|
|
DD aa 19179 DD aa 19179 DD aa 19179 DD bb 19179 DD bb 19179
|
|
|
|
DD bb 19179 DD bb 19179 EE aa 21718 EE aa 21718 EE bb 21718
|
|
|
|
EE bb 21718 EE bb 21718 FF aa 27386 FF aa 27386 FF aa 27386
|
|
|
|
FF aa 27386 FF bb 27386 FF bb 27386 FF bb 27386 FF bb 27386
|
|
|
|
FF bb 27386 FF bb 27386 GG aa 31854 GG aa 31854 GG aa 31854
|
|
|
|
GG aa 31854 GG bb 31854 GG bb 31854 GG bb 31854 GG bb 31854
|
|
|
|
HH aa 37297 HH aa 37297 HH aa 37297 HH bb 37297 HH bb 37297
|
|
|
|
HH bb 37297 HH bb 37297 HH bb 37297 HH bb 37297 II aa 40937
|
|
|
|
II aa 40937 II bb 40937 II bb 40937 II bb 40937 II bb 40937
|
|
|
|
II bb 40937 JJ aa 44737 JJ aa 44737 JJ aa 44737 JJ aa 44737
|
|
|
|
JJ bb 44737 JJ bb 44737 JJ bb 44737 JJ bb 44737}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.2.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 2307 AA aa 2307 AA aa 2307 AA aa 2307 AA bb 4685 AA bb 4685
|
|
|
|
AA bb 4685 AA bb 4685 BB aa 7558 BB aa 7558 BB aa 7558 BB aa 7558
|
|
|
|
BB aa 7558 BB aa 7558 BB bb 12025 BB bb 12025 BB bb 12025
|
|
|
|
BB bb 12025 BB bb 12025 BB bb 12025 CC aa 13979 CC aa 13979
|
|
|
|
CC aa 13979 CC aa 13979 CC bb 15147 CC bb 15147 DD aa 16472
|
|
|
|
DD aa 16472 DD aa 16472 DD bb 19179 DD bb 19179 DD bb 19179
|
|
|
|
DD bb 19179 EE aa 20069 EE aa 20069 EE bb 21718 EE bb 21718
|
|
|
|
EE bb 21718 FF aa 23881 FF aa 23881 FF aa 23881 FF aa 23881
|
|
|
|
FF bb 27386 FF bb 27386 FF bb 27386 FF bb 27386 FF bb 27386
|
|
|
|
FF bb 27386 GG aa 28983 GG aa 28983 GG aa 28983 GG aa 28983
|
|
|
|
GG bb 31854 GG bb 31854 GG bb 31854 GG bb 31854 HH aa 34103
|
|
|
|
HH aa 34103 HH aa 34103 HH bb 37297 HH bb 37297 HH bb 37297
|
|
|
|
HH bb 37297 HH bb 37297 HH bb 37297 II aa 38347 II aa 38347
|
|
|
|
II bb 40937 II bb 40937 II bb 40937 II bb 40937 II bb 40937
|
|
|
|
JJ aa 42951 JJ aa 42951 JJ aa 42951 JJ aa 42951 JJ bb 44737
|
|
|
|
JJ bb 44737 JJ bb 44737 JJ bb 44737}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.2.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.2.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 934 AA aa 934 AA aa 934 AA aa 934 AA bb 934 AA bb 934
|
|
|
|
AA bb 934 AA bb 934 BB aa 934 BB aa 934 BB aa 934 BB aa 934
|
|
|
|
BB aa 934 BB aa 934 BB bb 934 BB bb 934 BB bb 934 BB bb 934
|
|
|
|
BB bb 934 BB bb 934 CC aa 934 CC aa 934 CC aa 934 CC aa 934
|
|
|
|
CC bb 934 CC bb 934 DD aa 934 DD aa 934 DD aa 934 DD bb 959
|
|
|
|
DD bb 959 DD bb 959 DD bb 959 EE aa 959 EE aa 959 EE bb 959
|
|
|
|
EE bb 959 EE bb 959 FF aa 959 FF aa 959 FF aa 959 FF aa 959
|
|
|
|
FF bb 959 FF bb 959 FF bb 959 FF bb 959 FF bb 959 FF bb 959
|
|
|
|
GG aa 959 GG aa 959 GG aa 959 GG aa 959 GG bb 959 GG bb 959
|
|
|
|
GG bb 959 GG bb 959 HH aa 979 HH aa 979 HH aa 979 HH bb 979
|
|
|
|
HH bb 979 HH bb 979 HH bb 979 HH bb 979 HH bb 979 II aa 979
|
|
|
|
II aa 979 II bb 979 II bb 979 II bb 979 II bb 979 II bb 979
|
|
|
|
JJ aa 979 JJ aa 979 JJ aa 979 JJ aa 979 JJ bb 979 JJ bb 979
|
|
|
|
JJ bb 979 JJ bb 979}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.2.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 223 AA aa 223 AA aa 223 AA aa 223 AA bb 223 AA bb 223
|
|
|
|
AA bb 223 AA bb 223 BB aa 223 BB aa 223 BB aa 223 BB aa 223
|
|
|
|
BB aa 223 BB aa 223 BB bb 223 BB bb 223 BB bb 223 BB bb 223
|
|
|
|
BB bb 223 BB bb 223 CC aa 158 CC aa 158 CC aa 158 CC aa 158
|
|
|
|
CC bb 158 CC bb 158 DD aa 158 DD aa 158 DD aa 158 DD bb 158
|
|
|
|
DD bb 158 DD bb 158 DD bb 158 EE aa 113 EE aa 113 EE bb 113
|
|
|
|
EE bb 113 EE bb 113 FF aa 113 FF aa 113 FF aa 113 FF aa 113
|
|
|
|
FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102
|
|
|
|
GG aa 102 GG aa 102 GG aa 102 GG aa 102 GG bb 102 GG bb 102
|
|
|
|
GG bb 102 GG bb 102 HH aa 102 HH aa 102 HH aa 102 HH bb 102
|
|
|
|
HH bb 102 HH bb 102 HH bb 102 HH bb 102 HH bb 102 II aa 102
|
|
|
|
II aa 102 II bb 102 II bb 102 II bb 102 II bb 102 II bb 102
|
|
|
|
JJ aa 102 JJ aa 102 JJ aa 102 JJ aa 102 JJ bb 102 JJ bb 102
|
|
|
|
JJ bb 102 JJ bb 102}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.2.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 3751 AA aa 3774 AA aa 4446 AA aa 4462 AA bb 3815 AA bb 4058
|
|
|
|
AA bb 4113 AA bb 4376 BB aa 11263 BB aa 11365 BB aa 11613
|
|
|
|
BB aa 11626 BB aa 11632 BB aa 11778 BB bb 11185 BB bb 11233
|
|
|
|
BB bb 11239 BB bb 11314 BB bb 11320 BB bb 11392 CC aa 14388
|
|
|
|
CC aa 14540 CC aa 14717 CC aa 14989 CC bb 14325 CC bb 14801
|
|
|
|
DD aa 18334 DD aa 18923 DD aa 18955 DD bb 18220 DD bb 18385
|
|
|
|
DD bb 18463 DD bb 18941 EE aa 20941 EE aa 21605 EE bb 20950
|
|
|
|
EE bb 21089 EE bb 21466 FF aa 26716 FF aa 26719 FF aa 26768
|
|
|
|
FF aa 27178 FF bb 26448 FF bb 26516 FF bb 26660 FF bb 26812
|
|
|
|
FF bb 27091 FF bb 27284 GG aa 31220 GG aa 31374 GG aa 31519
|
|
|
|
GG aa 31706 GG bb 30916 GG bb 30925 GG bb 31010 GG bb 31694
|
|
|
|
HH aa 36318 HH aa 36507 HH aa 36817 HH bb 36334 HH bb 36567
|
|
|
|
HH bb 36614 HH bb 36942 HH bb 36967 HH bb 37164 II aa 40285
|
|
|
|
II aa 40539 II bb 40132 II bb 40266 II bb 40494 II bb 40516
|
|
|
|
II bb 40687 JJ aa 43838 JJ aa 43969 JJ aa 44503 JJ aa 44624
|
|
|
|
JJ bb 43898 JJ bb 44383 JJ bb 44401 JJ bb 44480}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.2.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1373 AA aa 1396 AA aa 2068 AA aa 2084 AA bb 3815 AA bb 4058
|
|
|
|
AA bb 4113 AA bb 4376 BB aa 6796 BB aa 6898 BB aa 7146 BB aa 7159
|
|
|
|
BB aa 7165 BB aa 7311 BB bb 11185 BB bb 11233 BB bb 11239
|
|
|
|
BB bb 11314 BB bb 11320 BB bb 11392 CC aa 13220 CC aa 13372
|
|
|
|
CC aa 13549 CC aa 13821 CC bb 14325 CC bb 14801 DD aa 15627
|
|
|
|
DD aa 16216 DD aa 16248 DD bb 18220 DD bb 18385 DD bb 18463
|
|
|
|
DD bb 18941 EE aa 19292 EE aa 19956 EE bb 20950 EE bb 21089
|
|
|
|
EE bb 21466 FF aa 23211 FF aa 23214 FF aa 23263 FF aa 23673
|
|
|
|
FF bb 26448 FF bb 26516 FF bb 26660 FF bb 26812 FF bb 27091
|
|
|
|
FF bb 27284 GG aa 28349 GG aa 28503 GG aa 28648 GG aa 28835
|
|
|
|
GG bb 30916 GG bb 30925 GG bb 31010 GG bb 31694 HH aa 33124
|
|
|
|
HH aa 33313 HH aa 33623 HH bb 36334 HH bb 36567 HH bb 36614
|
|
|
|
HH bb 36942 HH bb 36967 HH bb 37164 II aa 37695 II aa 37949
|
|
|
|
II bb 40132 II bb 40266 II bb 40494 II bb 40516 II bb 40687
|
|
|
|
JJ aa 42052 JJ aa 42183 JJ aa 42717 JJ aa 42838 JJ bb 43898
|
|
|
|
JJ bb 44383 JJ bb 44401 JJ bb 44480}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.2.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa 3751 4685 1373 2307 AA aa 3774 4685 1396 2307
|
|
|
|
AA aa 4446 4685 2068 2307 AA aa 4462 4685 2084 2307
|
|
|
|
AA bb 3815 4685 3815 4685 AA bb 4058 4685 4058 4685
|
|
|
|
AA bb 4113 4685 4113 4685 AA bb 4376 4685 4376 4685
|
|
|
|
BB aa 11263 12025 6796 7558 BB aa 11365 12025 6898 7558
|
|
|
|
BB aa 11613 12025 7146 7558 BB aa 11626 12025 7159 7558
|
|
|
|
BB aa 11632 12025 7165 7558 BB aa 11778 12025 7311 7558
|
|
|
|
BB bb 11185 12025 11185 12025 BB bb 11233 12025 11233 12025
|
|
|
|
BB bb 11239 12025 11239 12025 BB bb 11314 12025 11314 12025
|
|
|
|
BB bb 11320 12025 11320 12025 BB bb 11392 12025 11392 12025
|
|
|
|
CC aa 14388 15147 13220 13979 CC aa 14540 15147 13372 13979
|
|
|
|
CC aa 14717 15147 13549 13979 CC aa 14989 15147 13821 13979
|
|
|
|
CC bb 14325 15147 14325 15147 CC bb 14801 15147 14801 15147
|
|
|
|
DD aa 18334 19179 15627 16472 DD aa 18923 19179 16216 16472
|
|
|
|
DD aa 18955 19179 16248 16472 DD bb 18220 19179 18220 19179
|
|
|
|
DD bb 18385 19179 18385 19179 DD bb 18463 19179 18463 19179
|
|
|
|
DD bb 18941 19179 18941 19179 EE aa 20941 21718 19292 20069
|
|
|
|
EE aa 21605 21718 19956 20069 EE bb 20950 21718 20950 21718
|
|
|
|
EE bb 21089 21718 21089 21718 EE bb 21466 21718 21466 21718
|
|
|
|
FF aa 26716 27386 23211 23881 FF aa 26719 27386 23214 23881
|
|
|
|
FF aa 26768 27386 23263 23881 FF aa 27178 27386 23673 23881
|
|
|
|
FF bb 26448 27386 26448 27386 FF bb 26516 27386 26516 27386
|
|
|
|
FF bb 26660 27386 26660 27386 FF bb 26812 27386 26812 27386
|
|
|
|
FF bb 27091 27386 27091 27386 FF bb 27284 27386 27284 27386
|
|
|
|
GG aa 31220 31854 28349 28983 GG aa 31374 31854 28503 28983
|
|
|
|
GG aa 31519 31854 28648 28983 GG aa 31706 31854 28835 28983
|
|
|
|
GG bb 30916 31854 30916 31854 GG bb 30925 31854 30925 31854
|
|
|
|
GG bb 31010 31854 31010 31854 GG bb 31694 31854 31694 31854
|
|
|
|
HH aa 36318 37297 33124 34103 HH aa 36507 37297 33313 34103
|
|
|
|
HH aa 36817 37297 33623 34103 HH bb 36334 37297 36334 37297
|
|
|
|
HH bb 36567 37297 36567 37297 HH bb 36614 37297 36614 37297
|
|
|
|
HH bb 36942 37297 36942 37297 HH bb 36967 37297 36967 37297
|
|
|
|
HH bb 37164 37297 37164 37297 II aa 40285 40937 37695 38347
|
|
|
|
II aa 40539 40937 37949 38347 II bb 40132 40937 40132 40937
|
|
|
|
II bb 40266 40937 40266 40937 II bb 40494 40937 40494 40937
|
|
|
|
II bb 40516 40937 40516 40937 II bb 40687 40937 40687 40937
|
|
|
|
JJ aa 43838 44737 42052 42951 JJ aa 43969 44737 42183 42951
|
|
|
|
JJ aa 44503 44737 42717 42951 JJ aa 44624 44737 42838 42951
|
|
|
|
JJ bb 43898 44737 43898 44737 JJ bb 44383 44737 44383 44737
|
|
|
|
JJ bb 44401 44737 44401 44737 JJ bb 44480 44737 44480 44737}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.3.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 12025 AA aa 12025 AA aa 12025 AA aa 12025 AA bb 12025
|
|
|
|
AA bb 12025 AA bb 12025 AA bb 12025 BB aa 15147 BB aa 15147
|
|
|
|
BB aa 15147 BB aa 15147 BB aa 15147 BB aa 15147 BB bb 15147
|
|
|
|
BB bb 15147 BB bb 15147 BB bb 15147 BB bb 15147 BB bb 15147
|
|
|
|
CC aa 19179 CC aa 19179 CC aa 19179 CC aa 19179 CC bb 19179
|
|
|
|
CC bb 19179 DD aa 21718 DD aa 21718 DD aa 21718 DD bb 21718
|
|
|
|
DD bb 21718 DD bb 21718 DD bb 21718 EE aa 27386 EE aa 27386
|
|
|
|
EE bb 27386 EE bb 27386 EE bb 27386 FF aa 31854 FF aa 31854
|
|
|
|
FF aa 31854 FF aa 31854 FF bb 31854 FF bb 31854 FF bb 31854
|
|
|
|
FF bb 31854 FF bb 31854 FF bb 31854 GG aa 37297 GG aa 37297
|
|
|
|
GG aa 37297 GG aa 37297 GG bb 37297 GG bb 37297 GG bb 37297
|
|
|
|
GG bb 37297 HH aa 40937 HH aa 40937 HH aa 40937 HH bb 40937
|
|
|
|
HH bb 40937 HH bb 40937 HH bb 40937 HH bb 40937 HH bb 40937
|
|
|
|
II aa 44737 II aa 44737 II bb 44737 II bb 44737 II bb 44737
|
|
|
|
II bb 44737 II bb 44737 JJ aa 44737 JJ aa 44737 JJ aa 44737
|
|
|
|
JJ aa 44737 JJ bb 44737 JJ bb 44737 JJ bb 44737 JJ bb 44737}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.3.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 4685 AA aa 4685 AA aa 4685 AA aa 4685 AA bb 7558 AA bb 7558
|
|
|
|
AA bb 7558 AA bb 7558 BB aa 12025 BB aa 12025 BB aa 12025
|
|
|
|
BB aa 12025 BB aa 12025 BB aa 12025 BB bb 13979 BB bb 13979
|
|
|
|
BB bb 13979 BB bb 13979 BB bb 13979 BB bb 13979 CC aa 15147
|
|
|
|
CC aa 15147 CC aa 15147 CC aa 15147 CC bb 16472 CC bb 16472
|
|
|
|
DD aa 19179 DD aa 19179 DD aa 19179 DD bb 20069 DD bb 20069
|
|
|
|
DD bb 20069 DD bb 20069 EE aa 21718 EE aa 21718 EE bb 23881
|
|
|
|
EE bb 23881 EE bb 23881 FF aa 27386 FF aa 27386 FF aa 27386
|
|
|
|
FF aa 27386 FF bb 28983 FF bb 28983 FF bb 28983 FF bb 28983
|
|
|
|
FF bb 28983 FF bb 28983 GG aa 31854 GG aa 31854 GG aa 31854
|
|
|
|
GG aa 31854 GG bb 34103 GG bb 34103 GG bb 34103 GG bb 34103
|
|
|
|
HH aa 37297 HH aa 37297 HH aa 37297 HH bb 38347 HH bb 38347
|
|
|
|
HH bb 38347 HH bb 38347 HH bb 38347 HH bb 38347 II aa 40937
|
|
|
|
II aa 40937 II bb 42951 II bb 42951 II bb 42951 II bb 42951
|
|
|
|
II bb 42951 JJ aa 44737 JJ aa 44737 JJ aa 44737 JJ aa 44737
|
|
|
|
JJ bb 44737 JJ bb 44737 JJ bb 44737 JJ bb 44737}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.3.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.3.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 934 AA aa 934 AA aa 934 AA aa 934 AA bb 934 AA bb 934
|
|
|
|
AA bb 934 AA bb 934 BB aa 934 BB aa 934 BB aa 934 BB aa 934
|
|
|
|
BB aa 934 BB aa 934 BB bb 934 BB bb 934 BB bb 934 BB bb 934
|
|
|
|
BB bb 934 BB bb 934 CC aa 934 CC aa 934 CC aa 934 CC aa 934
|
|
|
|
CC bb 934 CC bb 934 DD aa 959 DD aa 959 DD aa 959 DD bb 959
|
|
|
|
DD bb 959 DD bb 959 DD bb 959 EE aa 959 EE aa 959 EE bb 959
|
|
|
|
EE bb 959 EE bb 959 FF aa 959 FF aa 959 FF aa 959 FF aa 959
|
|
|
|
FF bb 959 FF bb 959 FF bb 959 FF bb 959 FF bb 959 FF bb 959
|
|
|
|
GG aa 959 GG aa 959 GG aa 959 GG aa 959 GG bb 979 GG bb 979
|
|
|
|
GG bb 979 GG bb 979 HH aa 979 HH aa 979 HH aa 979 HH bb 979
|
|
|
|
HH bb 979 HH bb 979 HH bb 979 HH bb 979 HH bb 979 II aa 979
|
|
|
|
II aa 979 II bb 979 II bb 979 II bb 979 II bb 979 II bb 979
|
|
|
|
JJ aa 979 JJ aa 979 JJ aa 979 JJ aa 979 JJ bb 979 JJ bb 979
|
|
|
|
JJ bb 979 JJ bb 979}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.3.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 223 AA aa 223 AA aa 223 AA aa 223 AA bb 223 AA bb 223
|
|
|
|
AA bb 223 AA bb 223 BB aa 223 BB aa 223 BB aa 223 BB aa 223
|
|
|
|
BB aa 223 BB aa 223 BB bb 158 BB bb 158 BB bb 158 BB bb 158
|
|
|
|
BB bb 158 BB bb 158 CC aa 158 CC aa 158 CC aa 158 CC aa 158
|
|
|
|
CC bb 158 CC bb 158 DD aa 158 DD aa 158 DD aa 158 DD bb 113
|
|
|
|
DD bb 113 DD bb 113 DD bb 113 EE aa 113 EE aa 113 EE bb 113
|
|
|
|
EE bb 113 EE bb 113 FF aa 102 FF aa 102 FF aa 102 FF aa 102
|
|
|
|
FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102
|
|
|
|
GG aa 102 GG aa 102 GG aa 102 GG aa 102 GG bb 102 GG bb 102
|
|
|
|
GG bb 102 GG bb 102 HH aa 102 HH aa 102 HH aa 102 HH bb 102
|
|
|
|
HH bb 102 HH bb 102 HH bb 102 HH bb 102 HH bb 102 II aa 102
|
|
|
|
II aa 102 II bb 102 II bb 102 II bb 102 II bb 102 II bb 102
|
|
|
|
JJ aa 102 JJ aa 102 JJ aa 102 JJ aa 102 JJ bb 102 JJ bb 102
|
|
|
|
JJ bb 102 JJ bb 102}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.3.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 11091 AA aa 11114 AA aa 11786 AA aa 11802 AA bb 11155
|
|
|
|
AA bb 11398 AA bb 11453 AA bb 11716 BB aa 14385 BB aa 14487
|
|
|
|
BB aa 14735 BB aa 14748 BB aa 14754 BB aa 14900 BB bb 14307
|
|
|
|
BB bb 14355 BB bb 14361 BB bb 14436 BB bb 14442 BB bb 14514
|
|
|
|
CC aa 18420 CC aa 18572 CC aa 18749 CC aa 19021 CC bb 18357
|
|
|
|
CC bb 18833 DD aa 20873 DD aa 21462 DD aa 21494 DD bb 20759
|
|
|
|
DD bb 20924 DD bb 21002 DD bb 21480 EE aa 26609 EE aa 27273
|
|
|
|
EE bb 26618 EE bb 26757 EE bb 27134 FF aa 31184 FF aa 31187
|
|
|
|
FF aa 31236 FF aa 31646 FF bb 30916 FF bb 30984 FF bb 31128
|
|
|
|
FF bb 31280 FF bb 31559 FF bb 31752 GG aa 36663 GG aa 36817
|
|
|
|
GG aa 36962 GG aa 37149 GG bb 36359 GG bb 36368 GG bb 36453
|
|
|
|
GG bb 37137 HH aa 39958 HH aa 40147 HH aa 40457 HH bb 39974
|
|
|
|
HH bb 40207 HH bb 40254 HH bb 40582 HH bb 40607 HH bb 40804
|
|
|
|
II aa 44085 II aa 44339 II bb 43932 II bb 44066 II bb 44294
|
|
|
|
II bb 44316 II bb 44487 JJ aa 43838 JJ aa 43969 JJ aa 44503
|
|
|
|
JJ aa 44624 JJ bb 43898 JJ bb 44383 JJ bb 44401 JJ bb 44480}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.3.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 3751 AA aa 3774 AA aa 4446 AA aa 4462 AA bb 6688 AA bb 6931
|
|
|
|
AA bb 6986 AA bb 7249 BB aa 11263 BB aa 11365 BB aa 11613
|
|
|
|
BB aa 11626 BB aa 11632 BB aa 11778 BB bb 13139 BB bb 13187
|
|
|
|
BB bb 13193 BB bb 13268 BB bb 13274 BB bb 13346 CC aa 14388
|
|
|
|
CC aa 14540 CC aa 14717 CC aa 14989 CC bb 15650 CC bb 16126
|
|
|
|
DD aa 18334 DD aa 18923 DD aa 18955 DD bb 19110 DD bb 19275
|
|
|
|
DD bb 19353 DD bb 19831 EE aa 20941 EE aa 21605 EE bb 23113
|
|
|
|
EE bb 23252 EE bb 23629 FF aa 26716 FF aa 26719 FF aa 26768
|
|
|
|
FF aa 27178 FF bb 28045 FF bb 28113 FF bb 28257 FF bb 28409
|
|
|
|
FF bb 28688 FF bb 28881 GG aa 31220 GG aa 31374 GG aa 31519
|
|
|
|
GG aa 31706 GG bb 33165 GG bb 33174 GG bb 33259 GG bb 33943
|
|
|
|
HH aa 36318 HH aa 36507 HH aa 36817 HH bb 37384 HH bb 37617
|
|
|
|
HH bb 37664 HH bb 37992 HH bb 38017 HH bb 38214 II aa 40285
|
|
|
|
II aa 40539 II bb 42146 II bb 42280 II bb 42508 II bb 42530
|
|
|
|
II bb 42701 JJ aa 43838 JJ aa 43969 JJ aa 44503 JJ aa 44624
|
|
|
|
JJ bb 43898 JJ bb 44383 JJ bb 44401 JJ bb 44480}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.3.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa 11091 12025 3751 4685 AA aa 11114 12025 3774 4685
|
|
|
|
AA aa 11786 12025 4446 4685 AA aa 11802 12025 4462 4685
|
|
|
|
AA bb 11155 12025 6688 7558 AA bb 11398 12025 6931 7558
|
|
|
|
AA bb 11453 12025 6986 7558 AA bb 11716 12025 7249 7558
|
|
|
|
BB aa 14385 15147 11263 12025 BB aa 14487 15147 11365 12025
|
|
|
|
BB aa 14735 15147 11613 12025 BB aa 14748 15147 11626 12025
|
|
|
|
BB aa 14754 15147 11632 12025 BB aa 14900 15147 11778 12025
|
|
|
|
BB bb 14307 15147 13139 13979 BB bb 14355 15147 13187 13979
|
|
|
|
BB bb 14361 15147 13193 13979 BB bb 14436 15147 13268 13979
|
|
|
|
BB bb 14442 15147 13274 13979 BB bb 14514 15147 13346 13979
|
|
|
|
CC aa 18420 19179 14388 15147 CC aa 18572 19179 14540 15147
|
|
|
|
CC aa 18749 19179 14717 15147 CC aa 19021 19179 14989 15147
|
|
|
|
CC bb 18357 19179 15650 16472 CC bb 18833 19179 16126 16472
|
|
|
|
DD aa 20873 21718 18334 19179 DD aa 21462 21718 18923 19179
|
|
|
|
DD aa 21494 21718 18955 19179 DD bb 20759 21718 19110 20069
|
|
|
|
DD bb 20924 21718 19275 20069 DD bb 21002 21718 19353 20069
|
|
|
|
DD bb 21480 21718 19831 20069 EE aa 26609 27386 20941 21718
|
|
|
|
EE aa 27273 27386 21605 21718 EE bb 26618 27386 23113 23881
|
|
|
|
EE bb 26757 27386 23252 23881 EE bb 27134 27386 23629 23881
|
|
|
|
FF aa 31184 31854 26716 27386 FF aa 31187 31854 26719 27386
|
|
|
|
FF aa 31236 31854 26768 27386 FF aa 31646 31854 27178 27386
|
|
|
|
FF bb 30916 31854 28045 28983 FF bb 30984 31854 28113 28983
|
|
|
|
FF bb 31128 31854 28257 28983 FF bb 31280 31854 28409 28983
|
|
|
|
FF bb 31559 31854 28688 28983 FF bb 31752 31854 28881 28983
|
|
|
|
GG aa 36663 37297 31220 31854 GG aa 36817 37297 31374 31854
|
|
|
|
GG aa 36962 37297 31519 31854 GG aa 37149 37297 31706 31854
|
|
|
|
GG bb 36359 37297 33165 34103 GG bb 36368 37297 33174 34103
|
|
|
|
GG bb 36453 37297 33259 34103 GG bb 37137 37297 33943 34103
|
|
|
|
HH aa 39958 40937 36318 37297 HH aa 40147 40937 36507 37297
|
|
|
|
HH aa 40457 40937 36817 37297 HH bb 39974 40937 37384 38347
|
|
|
|
HH bb 40207 40937 37617 38347 HH bb 40254 40937 37664 38347
|
|
|
|
HH bb 40582 40937 37992 38347 HH bb 40607 40937 38017 38347
|
|
|
|
HH bb 40804 40937 38214 38347 II aa 44085 44737 40285 40937
|
|
|
|
II aa 44339 44737 40539 40937 II bb 43932 44737 42146 42951
|
|
|
|
II bb 44066 44737 42280 42951 II bb 44294 44737 42508 42951
|
|
|
|
II bb 44316 44737 42530 42951 II bb 44487 44737 42701 42951
|
|
|
|
JJ aa 43838 44737 43838 44737 JJ aa 43969 44737 43969 44737
|
|
|
|
JJ aa 44503 44737 44503 44737 JJ aa 44624 44737 44624 44737
|
|
|
|
JJ bb 43898 44737 43898 44737 JJ bb 44383 44737 44383 44737
|
|
|
|
JJ bb 44401 44737 44401 44737 JJ bb 44480 44737 44480 44737}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.4.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 44737 AA aa 44737 AA aa 44737 AA aa 44737 AA bb 44737
|
|
|
|
AA bb 44737 AA bb 44737 AA bb 44737 BB aa 44737 BB aa 44737
|
|
|
|
BB aa 44737 BB aa 44737 BB aa 44737 BB aa 44737 BB bb 44737
|
|
|
|
BB bb 44737 BB bb 44737 BB bb 44737 BB bb 44737 BB bb 44737
|
|
|
|
CC aa 44737 CC aa 44737 CC aa 44737 CC aa 44737 CC bb 44737
|
|
|
|
CC bb 44737 DD aa 44737 DD aa 44737 DD aa 44737 DD bb 44737
|
|
|
|
DD bb 44737 DD bb 44737 DD bb 44737 EE aa 44737 EE aa 44737
|
|
|
|
EE bb 44737 EE bb 44737 EE bb 44737 FF aa 44737 FF aa 44737
|
|
|
|
FF aa 44737 FF aa 44737 FF bb 44737 FF bb 44737 FF bb 44737
|
|
|
|
FF bb 44737 FF bb 44737 FF bb 44737 GG aa 44737 GG aa 44737
|
|
|
|
GG aa 44737 GG aa 44737 GG bb 44737 GG bb 44737 GG bb 44737
|
|
|
|
GG bb 44737 HH aa 44737 HH aa 44737 HH aa 44737 HH bb 44737
|
|
|
|
HH bb 44737 HH bb 44737 HH bb 44737 HH bb 44737 HH bb 44737
|
|
|
|
II aa 44737 II aa 44737 II bb 44737 II bb 44737 II bb 44737
|
|
|
|
II bb 44737 II bb 44737 JJ aa 44737 JJ aa 44737 JJ aa 44737
|
|
|
|
JJ aa 44737 JJ bb 44737 JJ bb 44737 JJ bb 44737 JJ bb 44737}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.4.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 44737 AA aa 44737 AA aa 44737 AA aa 44737 AA bb 44737
|
|
|
|
AA bb 44737 AA bb 44737 AA bb 44737 BB aa 44737 BB aa 44737
|
|
|
|
BB aa 44737 BB aa 44737 BB aa 44737 BB aa 44737 BB bb 44737
|
|
|
|
BB bb 44737 BB bb 44737 BB bb 44737 BB bb 44737 BB bb 44737
|
|
|
|
CC aa 44737 CC aa 44737 CC aa 44737 CC aa 44737 CC bb 44737
|
|
|
|
CC bb 44737 DD aa 44737 DD aa 44737 DD aa 44737 DD bb 44737
|
|
|
|
DD bb 44737 DD bb 44737 DD bb 44737 EE aa 44737 EE aa 44737
|
|
|
|
EE bb 44737 EE bb 44737 EE bb 44737 FF aa 44737 FF aa 44737
|
|
|
|
FF aa 44737 FF aa 44737 FF bb 44737 FF bb 44737 FF bb 44737
|
|
|
|
FF bb 44737 FF bb 44737 FF bb 44737 GG aa 44737 GG aa 44737
|
|
|
|
GG aa 44737 GG aa 44737 GG bb 44737 GG bb 44737 GG bb 44737
|
|
|
|
GG bb 44737 HH aa 44737 HH aa 44737 HH aa 44737 HH bb 44737
|
|
|
|
HH bb 44737 HH bb 44737 HH bb 44737 HH bb 44737 HH bb 44737
|
|
|
|
II aa 44737 II aa 44737 II bb 44737 II bb 44737 II bb 44737
|
|
|
|
II bb 44737 II bb 44737 JJ aa 44737 JJ aa 44737 JJ aa 44737
|
|
|
|
JJ aa 44737 JJ bb 44737 JJ bb 44737 JJ bb 44737 JJ bb 44737}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.4.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.4.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 979 AA aa 979 AA aa 979 AA aa 979 AA bb 979 AA bb 979
|
|
|
|
AA bb 979 AA bb 979 BB aa 979 BB aa 979 BB aa 979 BB aa 979
|
|
|
|
BB aa 979 BB aa 979 BB bb 979 BB bb 979 BB bb 979 BB bb 979
|
|
|
|
BB bb 979 BB bb 979 CC aa 979 CC aa 979 CC aa 979 CC aa 979
|
|
|
|
CC bb 979 CC bb 979 DD aa 979 DD aa 979 DD aa 979 DD bb 979
|
|
|
|
DD bb 979 DD bb 979 DD bb 979 EE aa 979 EE aa 979 EE bb 979
|
|
|
|
EE bb 979 EE bb 979 FF aa 979 FF aa 979 FF aa 979 FF aa 979
|
|
|
|
FF bb 979 FF bb 979 FF bb 979 FF bb 979 FF bb 979 FF bb 979
|
|
|
|
GG aa 979 GG aa 979 GG aa 979 GG aa 979 GG bb 979 GG bb 979
|
|
|
|
GG bb 979 GG bb 979 HH aa 979 HH aa 979 HH aa 979 HH bb 979
|
|
|
|
HH bb 979 HH bb 979 HH bb 979 HH bb 979 HH bb 979 II aa 979
|
|
|
|
II aa 979 II bb 979 II bb 979 II bb 979 II bb 979 II bb 979
|
|
|
|
JJ aa 979 JJ aa 979 JJ aa 979 JJ aa 979 JJ bb 979 JJ bb 979
|
|
|
|
JJ bb 979 JJ bb 979}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.4.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 102 AA aa 102 AA aa 102 AA aa 102 AA bb 102 AA bb 102
|
|
|
|
AA bb 102 AA bb 102 BB aa 102 BB aa 102 BB aa 102 BB aa 102
|
|
|
|
BB aa 102 BB aa 102 BB bb 102 BB bb 102 BB bb 102 BB bb 102
|
|
|
|
BB bb 102 BB bb 102 CC aa 102 CC aa 102 CC aa 102 CC aa 102
|
|
|
|
CC bb 102 CC bb 102 DD aa 102 DD aa 102 DD aa 102 DD bb 102
|
|
|
|
DD bb 102 DD bb 102 DD bb 102 EE aa 102 EE aa 102 EE bb 102
|
|
|
|
EE bb 102 EE bb 102 FF aa 102 FF aa 102 FF aa 102 FF aa 102
|
|
|
|
FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102
|
|
|
|
GG aa 102 GG aa 102 GG aa 102 GG aa 102 GG bb 102 GG bb 102
|
|
|
|
GG bb 102 GG bb 102 HH aa 102 HH aa 102 HH aa 102 HH bb 102
|
|
|
|
HH bb 102 HH bb 102 HH bb 102 HH bb 102 HH bb 102 II aa 102
|
|
|
|
II aa 102 II bb 102 II bb 102 II bb 102 II bb 102 II bb 102
|
|
|
|
JJ aa 102 JJ aa 102 JJ aa 102 JJ aa 102 JJ bb 102 JJ bb 102
|
|
|
|
JJ bb 102 JJ bb 102}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.4.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 43803 AA aa 43826 AA aa 44498 AA aa 44514 AA bb 43867
|
|
|
|
AA bb 44110 AA bb 44165 AA bb 44428 BB aa 43975 BB aa 44077
|
|
|
|
BB aa 44325 BB aa 44338 BB aa 44344 BB aa 44490 BB bb 43897
|
|
|
|
BB bb 43945 BB bb 43951 BB bb 44026 BB bb 44032 BB bb 44104
|
|
|
|
CC aa 43978 CC aa 44130 CC aa 44307 CC aa 44579 CC bb 43915
|
|
|
|
CC bb 44391 DD aa 43892 DD aa 44481 DD aa 44513 DD bb 43778
|
|
|
|
DD bb 43943 DD bb 44021 DD bb 44499 EE aa 43960 EE aa 44624
|
|
|
|
EE bb 43969 EE bb 44108 EE bb 44485 FF aa 44067 FF aa 44070
|
|
|
|
FF aa 44119 FF aa 44529 FF bb 43799 FF bb 43867 FF bb 44011
|
|
|
|
FF bb 44163 FF bb 44442 FF bb 44635 GG aa 44103 GG aa 44257
|
|
|
|
GG aa 44402 GG aa 44589 GG bb 43799 GG bb 43808 GG bb 43893
|
|
|
|
GG bb 44577 HH aa 43758 HH aa 43947 HH aa 44257 HH bb 43774
|
|
|
|
HH bb 44007 HH bb 44054 HH bb 44382 HH bb 44407 HH bb 44604
|
|
|
|
II aa 44085 II aa 44339 II bb 43932 II bb 44066 II bb 44294
|
|
|
|
II bb 44316 II bb 44487 JJ aa 43838 JJ aa 43969 JJ aa 44503
|
|
|
|
JJ aa 44624 JJ bb 43898 JJ bb 44383 JJ bb 44401 JJ bb 44480}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.4.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 43803 AA aa 43826 AA aa 44498 AA aa 44514 AA bb 43867
|
|
|
|
AA bb 44110 AA bb 44165 AA bb 44428 BB aa 43975 BB aa 44077
|
|
|
|
BB aa 44325 BB aa 44338 BB aa 44344 BB aa 44490 BB bb 43897
|
|
|
|
BB bb 43945 BB bb 43951 BB bb 44026 BB bb 44032 BB bb 44104
|
|
|
|
CC aa 43978 CC aa 44130 CC aa 44307 CC aa 44579 CC bb 43915
|
|
|
|
CC bb 44391 DD aa 43892 DD aa 44481 DD aa 44513 DD bb 43778
|
|
|
|
DD bb 43943 DD bb 44021 DD bb 44499 EE aa 43960 EE aa 44624
|
|
|
|
EE bb 43969 EE bb 44108 EE bb 44485 FF aa 44067 FF aa 44070
|
|
|
|
FF aa 44119 FF aa 44529 FF bb 43799 FF bb 43867 FF bb 44011
|
|
|
|
FF bb 44163 FF bb 44442 FF bb 44635 GG aa 44103 GG aa 44257
|
|
|
|
GG aa 44402 GG aa 44589 GG bb 43799 GG bb 43808 GG bb 43893
|
|
|
|
GG bb 44577 HH aa 43758 HH aa 43947 HH aa 44257 HH bb 43774
|
|
|
|
HH bb 44007 HH bb 44054 HH bb 44382 HH bb 44407 HH bb 44604
|
|
|
|
II aa 44085 II aa 44339 II bb 43932 II bb 44066 II bb 44294
|
|
|
|
II bb 44316 II bb 44487 JJ aa 43838 JJ aa 43969 JJ aa 44503
|
|
|
|
JJ aa 44624 JJ bb 43898 JJ bb 44383 JJ bb 44401 JJ bb 44480}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.4.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa 43803 44737 43803 44737 AA aa 43826 44737 43826 44737
|
|
|
|
AA aa 44498 44737 44498 44737 AA aa 44514 44737 44514 44737
|
|
|
|
AA bb 43867 44737 43867 44737 AA bb 44110 44737 44110 44737
|
|
|
|
AA bb 44165 44737 44165 44737 AA bb 44428 44737 44428 44737
|
|
|
|
BB aa 43975 44737 43975 44737 BB aa 44077 44737 44077 44737
|
|
|
|
BB aa 44325 44737 44325 44737 BB aa 44338 44737 44338 44737
|
|
|
|
BB aa 44344 44737 44344 44737 BB aa 44490 44737 44490 44737
|
|
|
|
BB bb 43897 44737 43897 44737 BB bb 43945 44737 43945 44737
|
|
|
|
BB bb 43951 44737 43951 44737 BB bb 44026 44737 44026 44737
|
|
|
|
BB bb 44032 44737 44032 44737 BB bb 44104 44737 44104 44737
|
|
|
|
CC aa 43978 44737 43978 44737 CC aa 44130 44737 44130 44737
|
|
|
|
CC aa 44307 44737 44307 44737 CC aa 44579 44737 44579 44737
|
|
|
|
CC bb 43915 44737 43915 44737 CC bb 44391 44737 44391 44737
|
|
|
|
DD aa 43892 44737 43892 44737 DD aa 44481 44737 44481 44737
|
|
|
|
DD aa 44513 44737 44513 44737 DD bb 43778 44737 43778 44737
|
|
|
|
DD bb 43943 44737 43943 44737 DD bb 44021 44737 44021 44737
|
|
|
|
DD bb 44499 44737 44499 44737 EE aa 43960 44737 43960 44737
|
|
|
|
EE aa 44624 44737 44624 44737 EE bb 43969 44737 43969 44737
|
|
|
|
EE bb 44108 44737 44108 44737 EE bb 44485 44737 44485 44737
|
|
|
|
FF aa 44067 44737 44067 44737 FF aa 44070 44737 44070 44737
|
|
|
|
FF aa 44119 44737 44119 44737 FF aa 44529 44737 44529 44737
|
|
|
|
FF bb 43799 44737 43799 44737 FF bb 43867 44737 43867 44737
|
|
|
|
FF bb 44011 44737 44011 44737 FF bb 44163 44737 44163 44737
|
|
|
|
FF bb 44442 44737 44442 44737 FF bb 44635 44737 44635 44737
|
|
|
|
GG aa 44103 44737 44103 44737 GG aa 44257 44737 44257 44737
|
|
|
|
GG aa 44402 44737 44402 44737 GG aa 44589 44737 44589 44737
|
|
|
|
GG bb 43799 44737 43799 44737 GG bb 43808 44737 43808 44737
|
|
|
|
GG bb 43893 44737 43893 44737 GG bb 44577 44737 44577 44737
|
|
|
|
HH aa 43758 44737 43758 44737 HH aa 43947 44737 43947 44737
|
|
|
|
HH aa 44257 44737 44257 44737 HH bb 43774 44737 43774 44737
|
|
|
|
HH bb 44007 44737 44007 44737 HH bb 44054 44737 44054 44737
|
|
|
|
HH bb 44382 44737 44382 44737 HH bb 44407 44737 44407 44737
|
|
|
|
HH bb 44604 44737 44604 44737 II aa 44085 44737 44085 44737
|
|
|
|
II aa 44339 44737 44339 44737 II bb 43932 44737 43932 44737
|
|
|
|
II bb 44066 44737 44066 44737 II bb 44294 44737 44294 44737
|
|
|
|
II bb 44316 44737 44316 44737 II bb 44487 44737 44487 44737
|
|
|
|
JJ aa 43838 44737 43838 44737 JJ aa 43969 44737 43969 44737
|
|
|
|
JJ aa 44503 44737 44503 44737 JJ aa 44624 44737 44624 44737
|
|
|
|
JJ bb 43898 44737 43898 44737 JJ bb 44383 44737 44383 44737
|
|
|
|
JJ bb 44401 44737 44401 44737 JJ bb 44480 44737 44480 44737}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.5.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 1 PRECEDING AND 2 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {}
|
|
|
|
BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} CC aa {}
|
|
|
|
CC aa {} CC aa {} CC aa {} CC bb {} CC bb {} DD aa {} DD aa {}
|
|
|
|
DD aa {} DD bb {} DD bb {} DD bb {} DD bb {} EE aa {} EE aa {}
|
|
|
|
EE bb {} EE bb {} EE bb {} FF aa {} FF aa {} FF aa {} FF aa {}
|
|
|
|
FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} GG aa {}
|
|
|
|
GG aa {} GG aa {} GG aa {} GG bb {} GG bb {} GG bb {} GG bb {}
|
|
|
|
HH aa {} HH aa {} HH aa {} HH bb {} HH bb {} HH bb {} HH bb {}
|
|
|
|
HH bb {} HH bb {} II aa {} II aa {} II bb {} II bb {} II bb {}
|
|
|
|
II bb {} II bb {} JJ aa {} JJ aa {} JJ aa {} JJ aa {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {} JJ bb {}}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.5.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 PRECEDING AND 2 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {}
|
|
|
|
BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} CC aa {}
|
|
|
|
CC aa {} CC aa {} CC aa {} CC bb {} CC bb {} DD aa {} DD aa {}
|
|
|
|
DD aa {} DD bb {} DD bb {} DD bb {} DD bb {} EE aa {} EE aa {}
|
|
|
|
EE bb {} EE bb {} EE bb {} FF aa {} FF aa {} FF aa {} FF aa {}
|
|
|
|
FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} GG aa {}
|
|
|
|
GG aa {} GG aa {} GG aa {} GG bb {} GG bb {} GG bb {} GG bb {}
|
|
|
|
HH aa {} HH aa {} HH aa {} HH bb {} HH bb {} HH bb {} HH bb {}
|
|
|
|
HH bb {} HH bb {} II aa {} II aa {} II bb {} II bb {} II bb {}
|
|
|
|
II bb {} II bb {} JJ aa {} JJ aa {} JJ aa {} JJ aa {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {} JJ bb {}}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.5.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN 1 PRECEDING AND 2 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.5.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 PRECEDING AND 2 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {}
|
|
|
|
BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} CC aa {}
|
|
|
|
CC aa {} CC aa {} CC aa {} CC bb {} CC bb {} DD aa {} DD aa {}
|
|
|
|
DD aa {} DD bb {} DD bb {} DD bb {} DD bb {} EE aa {} EE aa {}
|
|
|
|
EE bb {} EE bb {} EE bb {} FF aa {} FF aa {} FF aa {} FF aa {}
|
|
|
|
FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} GG aa {}
|
|
|
|
GG aa {} GG aa {} GG aa {} GG bb {} GG bb {} GG bb {} GG bb {}
|
|
|
|
HH aa {} HH aa {} HH aa {} HH bb {} HH bb {} HH bb {} HH bb {}
|
|
|
|
HH bb {} HH bb {} II aa {} II aa {} II bb {} II bb {} II bb {}
|
|
|
|
II bb {} II bb {} JJ aa {} JJ aa {} JJ aa {} JJ aa {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {} JJ bb {}}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.5.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 PRECEDING AND 2 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {}
|
|
|
|
BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} CC aa {}
|
|
|
|
CC aa {} CC aa {} CC aa {} CC bb {} CC bb {} DD aa {} DD aa {}
|
|
|
|
DD aa {} DD bb {} DD bb {} DD bb {} DD bb {} EE aa {} EE aa {}
|
|
|
|
EE bb {} EE bb {} EE bb {} FF aa {} FF aa {} FF aa {} FF aa {}
|
|
|
|
FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} GG aa {}
|
|
|
|
GG aa {} GG aa {} GG aa {} GG bb {} GG bb {} GG bb {} GG bb {}
|
|
|
|
HH aa {} HH aa {} HH aa {} HH bb {} HH bb {} HH bb {} HH bb {}
|
|
|
|
HH bb {} HH bb {} II aa {} II aa {} II bb {} II bb {} II bb {}
|
|
|
|
II bb {} II bb {} JJ aa {} JJ aa {} JJ aa {} JJ aa {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {} JJ bb {}}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.5.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 1 PRECEDING AND 2 PRECEDING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {}
|
|
|
|
BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} CC aa {}
|
|
|
|
CC aa {} CC aa {} CC aa {} CC bb {} CC bb {} DD aa {} DD aa {}
|
|
|
|
DD aa {} DD bb {} DD bb {} DD bb {} DD bb {} EE aa {} EE aa {}
|
|
|
|
EE bb {} EE bb {} EE bb {} FF aa {} FF aa {} FF aa {} FF aa {}
|
|
|
|
FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} GG aa {}
|
|
|
|
GG aa {} GG aa {} GG aa {} GG bb {} GG bb {} GG bb {} GG bb {}
|
|
|
|
HH aa {} HH aa {} HH aa {} HH bb {} HH bb {} HH bb {} HH bb {}
|
|
|
|
HH bb {} HH bb {} II aa {} II aa {} II bb {} II bb {} II bb {}
|
|
|
|
II bb {} II bb {} JJ aa {} JJ aa {} JJ aa {} JJ aa {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {} JJ bb {}}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.5.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 PRECEDING AND 2 PRECEDING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {}
|
|
|
|
BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} CC aa {}
|
|
|
|
CC aa {} CC aa {} CC aa {} CC bb {} CC bb {} DD aa {} DD aa {}
|
|
|
|
DD aa {} DD bb {} DD bb {} DD bb {} DD bb {} EE aa {} EE aa {}
|
|
|
|
EE bb {} EE bb {} EE bb {} FF aa {} FF aa {} FF aa {} FF aa {}
|
|
|
|
FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} GG aa {}
|
|
|
|
GG aa {} GG aa {} GG aa {} GG bb {} GG bb {} GG bb {} GG bb {}
|
|
|
|
HH aa {} HH aa {} HH aa {} HH bb {} HH bb {} HH bb {} HH bb {}
|
|
|
|
HH bb {} HH bb {} II aa {} II aa {} II bb {} II bb {} II bb {}
|
|
|
|
II bb {} II bb {} JJ aa {} JJ aa {} JJ aa {} JJ aa {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {} JJ bb {}}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.5.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 1 PRECEDING AND 2 PRECEDING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 1 PRECEDING AND 2 PRECEDING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 PRECEDING AND 2 PRECEDING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 PRECEDING AND 2 PRECEDING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa {} {} {} {} AA aa {} {} {} {} AA aa {} {} {} {}
|
|
|
|
AA aa {} {} {} {} AA bb {} {} {} {} AA bb {} {} {} {}
|
|
|
|
AA bb {} {} {} {} AA bb {} {} {} {} BB aa {} {} {} {}
|
|
|
|
BB aa {} {} {} {} BB aa {} {} {} {} BB aa {} {} {} {}
|
|
|
|
BB aa {} {} {} {} BB aa {} {} {} {} BB bb {} {} {} {}
|
|
|
|
BB bb {} {} {} {} BB bb {} {} {} {} BB bb {} {} {} {}
|
|
|
|
BB bb {} {} {} {} BB bb {} {} {} {} CC aa {} {} {} {}
|
|
|
|
CC aa {} {} {} {} CC aa {} {} {} {} CC aa {} {} {} {}
|
|
|
|
CC bb {} {} {} {} CC bb {} {} {} {} DD aa {} {} {} {}
|
|
|
|
DD aa {} {} {} {} DD aa {} {} {} {} DD bb {} {} {} {}
|
|
|
|
DD bb {} {} {} {} DD bb {} {} {} {} DD bb {} {} {} {}
|
|
|
|
EE aa {} {} {} {} EE aa {} {} {} {} EE bb {} {} {} {}
|
|
|
|
EE bb {} {} {} {} EE bb {} {} {} {} FF aa {} {} {} {}
|
|
|
|
FF aa {} {} {} {} FF aa {} {} {} {} FF aa {} {} {} {}
|
|
|
|
FF bb {} {} {} {} FF bb {} {} {} {} FF bb {} {} {} {}
|
|
|
|
FF bb {} {} {} {} FF bb {} {} {} {} FF bb {} {} {} {}
|
|
|
|
GG aa {} {} {} {} GG aa {} {} {} {} GG aa {} {} {} {}
|
|
|
|
GG aa {} {} {} {} GG bb {} {} {} {} GG bb {} {} {} {}
|
|
|
|
GG bb {} {} {} {} GG bb {} {} {} {} HH aa {} {} {} {}
|
|
|
|
HH aa {} {} {} {} HH aa {} {} {} {} HH bb {} {} {} {}
|
|
|
|
HH bb {} {} {} {} HH bb {} {} {} {} HH bb {} {} {} {}
|
|
|
|
HH bb {} {} {} {} HH bb {} {} {} {} II aa {} {} {} {}
|
|
|
|
II aa {} {} {} {} II bb {} {} {} {} II bb {} {} {} {}
|
|
|
|
II bb {} {} {} {} II bb {} {} {} {} II bb {} {} {} {}
|
|
|
|
JJ aa {} {} {} {} JJ aa {} {} {} {} JJ aa {} {} {} {}
|
|
|
|
JJ aa {} {} {} {} JJ bb {} {} {} {} JJ bb {} {} {} {}
|
|
|
|
JJ bb {} {} {} {} JJ bb {} {} {} {}}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.6.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 2 PRECEDING AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685
|
|
|
|
BB aa 4685 BB bb 4685 BB bb 4685 BB bb 4685 BB bb 4685 BB bb 4685
|
|
|
|
BB bb 4685 CC aa 12025 CC aa 12025 CC aa 12025 CC aa 12025
|
|
|
|
CC bb 12025 CC bb 12025 DD aa 10462 DD aa 10462 DD aa 10462
|
|
|
|
DD bb 10462 DD bb 10462 DD bb 10462 DD bb 10462 EE aa 7154
|
|
|
|
EE aa 7154 EE bb 7154 EE bb 7154 EE bb 7154 FF aa 6571 FF aa 6571
|
|
|
|
FF aa 6571 FF aa 6571 FF bb 6571 FF bb 6571 FF bb 6571 FF bb 6571
|
|
|
|
FF bb 6571 FF bb 6571 GG aa 8207 GG aa 8207 GG aa 8207 GG aa 8207
|
|
|
|
GG bb 8207 GG bb 8207 GG bb 8207 GG bb 8207 HH aa 10136
|
|
|
|
HH aa 10136 HH aa 10136 HH bb 10136 HH bb 10136 HH bb 10136
|
|
|
|
HH bb 10136 HH bb 10136 HH bb 10136 II aa 9911 II aa 9911
|
|
|
|
II bb 9911 II bb 9911 II bb 9911 II bb 9911 II bb 9911 JJ aa 9083
|
|
|
|
JJ aa 9083 JJ aa 9083 JJ aa 9083 JJ bb 9083 JJ bb 9083 JJ bb 9083
|
|
|
|
JJ bb 9083}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.6.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb 2307 AA bb 2307
|
|
|
|
AA bb 2307 AA bb 2307 BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685
|
|
|
|
BB aa 4685 BB aa 4685 BB bb 5251 BB bb 5251 BB bb 5251 BB bb 5251
|
|
|
|
BB bb 5251 BB bb 5251 CC aa 7340 CC aa 7340 CC aa 7340 CC aa 7340
|
|
|
|
CC bb 6421 CC bb 6421 DD aa 3122 DD aa 3122 DD aa 3122 DD bb 2493
|
|
|
|
DD bb 2493 DD bb 2493 DD bb 2493 EE aa 4032 EE aa 4032 EE bb 3597
|
|
|
|
EE bb 3597 EE bb 3597 FF aa 2539 FF aa 2539 FF aa 2539 FF aa 2539
|
|
|
|
FF bb 3812 FF bb 3812 FF bb 3812 FF bb 3812 FF bb 3812 FF bb 3812
|
|
|
|
GG aa 5668 GG aa 5668 GG aa 5668 GG aa 5668 GG bb 5102 GG bb 5102
|
|
|
|
GG bb 5102 GG bb 5102 HH aa 4468 HH aa 4468 HH aa 4468 HH bb 5120
|
|
|
|
HH bb 5120 HH bb 5120 HH bb 5120 HH bb 5120 HH bb 5120 II aa 5443
|
|
|
|
II aa 5443 II bb 4244 II bb 4244 II bb 4244 II bb 4244 II bb 4244
|
|
|
|
JJ aa 3640 JJ aa 3640 JJ aa 3640 JJ aa 3640 JJ bb 4604 JJ bb 4604
|
|
|
|
JJ bb 4604 JJ bb 4604}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.6.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN 2 PRECEDING AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.6.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb 934 AA bb 934
|
|
|
|
AA bb 934 AA bb 934 BB aa 934 BB aa 934 BB aa 934 BB aa 934
|
|
|
|
BB aa 934 BB aa 934 BB bb 870 BB bb 870 BB bb 870 BB bb 870
|
|
|
|
BB bb 870 BB bb 870 CC aa 840 CC aa 840 CC aa 840 CC aa 840
|
|
|
|
CC bb 840 CC bb 840 DD aa 822 DD aa 822 DD aa 822 DD bb 845
|
|
|
|
DD bb 845 DD bb 845 DD bb 845 EE aa 959 EE aa 959 EE bb 959
|
|
|
|
EE bb 959 EE bb 959 FF aa 777 FF aa 777 FF aa 777 FF aa 777
|
|
|
|
FF bb 768 FF bb 768 FF bb 768 FF bb 768 FF bb 768 FF bb 768
|
|
|
|
GG aa 938 GG aa 938 GG aa 938 GG aa 938 GG bb 938 GG bb 938
|
|
|
|
GG bb 938 GG bb 938 HH aa 938 HH aa 938 HH aa 938 HH bb 979
|
|
|
|
HH bb 979 HH bb 979 HH bb 979 HH bb 979 HH bb 979 II aa 979
|
|
|
|
II aa 979 II bb 963 II bb 963 II bb 963 II bb 963 II bb 963
|
|
|
|
JJ aa 805 JJ aa 805 JJ aa 805 JJ aa 805 JJ bb 899 JJ bb 899
|
|
|
|
JJ bb 899 JJ bb 899}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.6.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb 223 AA bb 223
|
|
|
|
AA bb 223 AA bb 223 BB aa 223 BB aa 223 BB aa 223 BB aa 223
|
|
|
|
BB aa 223 BB aa 223 BB bb 247 BB bb 247 BB bb 247 BB bb 247
|
|
|
|
BB bb 247 BB bb 247 CC aa 247 CC aa 247 CC aa 247 CC aa 247
|
|
|
|
CC bb 158 CC bb 158 DD aa 158 DD aa 158 DD aa 158 DD bb 224
|
|
|
|
DD bb 224 DD bb 224 DD bb 224 EE aa 224 EE aa 224 EE bb 113
|
|
|
|
EE bb 113 EE bb 113 FF aa 113 FF aa 113 FF aa 113 FF aa 113
|
|
|
|
FF bb 208 FF bb 208 FF bb 208 FF bb 208 FF bb 208 FF bb 208
|
|
|
|
GG aa 102 GG aa 102 GG aa 102 GG aa 102 GG bb 102 GG bb 102
|
|
|
|
GG bb 102 GG bb 102 HH aa 148 HH aa 148 HH aa 148 HH bb 160
|
|
|
|
HH bb 160 HH bb 160 HH bb 160 HH bb 160 HH bb 160 II aa 133
|
|
|
|
II aa 133 II bb 133 II bb 133 II bb 133 II bb 133 II bb 133
|
|
|
|
JJ aa 250 JJ aa 250 JJ aa 250 JJ aa 250 JJ bb 113 JJ bb 113
|
|
|
|
JJ bb 113 JJ bb 113}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.6.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 2 PRECEDING AND 1 PRECEDING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685
|
|
|
|
BB aa 4685 BB bb 4685 BB bb 4685 BB bb 4685 BB bb 4685 BB bb 4685
|
|
|
|
BB bb 4685 CC aa 12025 CC aa 12025 CC aa 12025 CC aa 12025
|
|
|
|
CC bb 12025 CC bb 12025 DD aa 10462 DD aa 10462 DD aa 10462
|
|
|
|
DD bb 10462 DD bb 10462 DD bb 10462 DD bb 10462 EE aa 7154
|
|
|
|
EE aa 7154 EE bb 7154 EE bb 7154 EE bb 7154 FF aa 6571 FF aa 6571
|
|
|
|
FF aa 6571 FF aa 6571 FF bb 6571 FF bb 6571 FF bb 6571 FF bb 6571
|
|
|
|
FF bb 6571 FF bb 6571 GG aa 8207 GG aa 8207 GG aa 8207 GG aa 8207
|
|
|
|
GG bb 8207 GG bb 8207 GG bb 8207 GG bb 8207 HH aa 10136
|
|
|
|
HH aa 10136 HH aa 10136 HH bb 10136 HH bb 10136 HH bb 10136
|
|
|
|
HH bb 10136 HH bb 10136 HH bb 10136 II aa 9911 II aa 9911
|
|
|
|
II bb 9911 II bb 9911 II bb 9911 II bb 9911 II bb 9911 JJ aa 9083
|
|
|
|
JJ aa 9083 JJ aa 9083 JJ aa 9083 JJ bb 9083 JJ bb 9083 JJ bb 9083
|
|
|
|
JJ bb 9083}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.6.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND 1 PRECEDING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb 2307 AA bb 2307
|
|
|
|
AA bb 2307 AA bb 2307 BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685
|
|
|
|
BB aa 4685 BB aa 4685 BB bb 5251 BB bb 5251 BB bb 5251 BB bb 5251
|
|
|
|
BB bb 5251 BB bb 5251 CC aa 7340 CC aa 7340 CC aa 7340 CC aa 7340
|
|
|
|
CC bb 6421 CC bb 6421 DD aa 3122 DD aa 3122 DD aa 3122 DD bb 2493
|
|
|
|
DD bb 2493 DD bb 2493 DD bb 2493 EE aa 4032 EE aa 4032 EE bb 3597
|
|
|
|
EE bb 3597 EE bb 3597 FF aa 2539 FF aa 2539 FF aa 2539 FF aa 2539
|
|
|
|
FF bb 3812 FF bb 3812 FF bb 3812 FF bb 3812 FF bb 3812 FF bb 3812
|
|
|
|
GG aa 5668 GG aa 5668 GG aa 5668 GG aa 5668 GG bb 5102 GG bb 5102
|
|
|
|
GG bb 5102 GG bb 5102 HH aa 4468 HH aa 4468 HH aa 4468 HH bb 5120
|
|
|
|
HH bb 5120 HH bb 5120 HH bb 5120 HH bb 5120 HH bb 5120 II aa 5443
|
|
|
|
II aa 5443 II bb 4244 II bb 4244 II bb 4244 II bb 4244 II bb 4244
|
|
|
|
JJ aa 3640 JJ aa 3640 JJ aa 3640 JJ aa 3640 JJ bb 4604 JJ bb 4604
|
|
|
|
JJ bb 4604 JJ bb 4604}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.6.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 2 PRECEDING AND 1 PRECEDING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 2 PRECEDING AND 1 PRECEDING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND 1 PRECEDING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND 1 PRECEDING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa {} {} {} {} AA aa {} {} {} {} AA aa {} {} {} {}
|
|
|
|
AA aa {} {} {} {} AA bb {} {} 2307 2307 AA bb {} {} 2307 2307
|
|
|
|
AA bb {} {} 2307 2307 AA bb {} {} 2307 2307 BB aa 4685 4685 4685 4685
|
|
|
|
BB aa 4685 4685 4685 4685 BB aa 4685 4685 4685 4685
|
|
|
|
BB aa 4685 4685 4685 4685 BB aa 4685 4685 4685 4685
|
|
|
|
BB aa 4685 4685 4685 4685 BB bb 4685 4685 5251 5251
|
|
|
|
BB bb 4685 4685 5251 5251 BB bb 4685 4685 5251 5251
|
|
|
|
BB bb 4685 4685 5251 5251 BB bb 4685 4685 5251 5251
|
|
|
|
BB bb 4685 4685 5251 5251 CC aa 12025 12025 7340 7340
|
|
|
|
CC aa 12025 12025 7340 7340 CC aa 12025 12025 7340 7340
|
|
|
|
CC aa 12025 12025 7340 7340 CC bb 12025 12025 6421 6421
|
|
|
|
CC bb 12025 12025 6421 6421 DD aa 10462 10462 3122 3122
|
|
|
|
DD aa 10462 10462 3122 3122 DD aa 10462 10462 3122 3122
|
|
|
|
DD bb 10462 10462 2493 2493 DD bb 10462 10462 2493 2493
|
|
|
|
DD bb 10462 10462 2493 2493 DD bb 10462 10462 2493 2493
|
|
|
|
EE aa 7154 7154 4032 4032 EE aa 7154 7154 4032 4032
|
|
|
|
EE bb 7154 7154 3597 3597 EE bb 7154 7154 3597 3597
|
|
|
|
EE bb 7154 7154 3597 3597 FF aa 6571 6571 2539 2539
|
|
|
|
FF aa 6571 6571 2539 2539 FF aa 6571 6571 2539 2539
|
|
|
|
FF aa 6571 6571 2539 2539 FF bb 6571 6571 3812 3812
|
|
|
|
FF bb 6571 6571 3812 3812 FF bb 6571 6571 3812 3812
|
|
|
|
FF bb 6571 6571 3812 3812 FF bb 6571 6571 3812 3812
|
|
|
|
FF bb 6571 6571 3812 3812 GG aa 8207 8207 5668 5668
|
|
|
|
GG aa 8207 8207 5668 5668 GG aa 8207 8207 5668 5668
|
|
|
|
GG aa 8207 8207 5668 5668 GG bb 8207 8207 5102 5102
|
|
|
|
GG bb 8207 8207 5102 5102 GG bb 8207 8207 5102 5102
|
|
|
|
GG bb 8207 8207 5102 5102 HH aa 10136 10136 4468 4468
|
|
|
|
HH aa 10136 10136 4468 4468 HH aa 10136 10136 4468 4468
|
|
|
|
HH bb 10136 10136 5120 5120 HH bb 10136 10136 5120 5120
|
|
|
|
HH bb 10136 10136 5120 5120 HH bb 10136 10136 5120 5120
|
|
|
|
HH bb 10136 10136 5120 5120 HH bb 10136 10136 5120 5120
|
|
|
|
II aa 9911 9911 5443 5443 II aa 9911 9911 5443 5443
|
|
|
|
II bb 9911 9911 4244 4244 II bb 9911 9911 4244 4244
|
|
|
|
II bb 9911 9911 4244 4244 II bb 9911 9911 4244 4244
|
|
|
|
II bb 9911 9911 4244 4244 JJ aa 9083 9083 3640 3640
|
|
|
|
JJ aa 9083 9083 3640 3640 JJ aa 9083 9083 3640 3640
|
|
|
|
JJ aa 9083 9083 3640 3640 JJ bb 9083 9083 4604 4604
|
|
|
|
JJ bb 9083 9083 4604 4604 JJ bb 9083 9083 4604 4604
|
|
|
|
JJ bb 9083 9083 4604 4604}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.7.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 3 PRECEDING AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685
|
|
|
|
BB aa 4685 BB bb 4685 BB bb 4685 BB bb 4685 BB bb 4685 BB bb 4685
|
|
|
|
BB bb 4685 CC aa 12025 CC aa 12025 CC aa 12025 CC aa 12025
|
|
|
|
CC bb 12025 CC bb 12025 DD aa 15147 DD aa 15147 DD aa 15147
|
|
|
|
DD bb 15147 DD bb 15147 DD bb 15147 DD bb 15147 EE aa 14494
|
|
|
|
EE aa 14494 EE bb 14494 EE bb 14494 EE bb 14494 FF aa 9693
|
|
|
|
FF aa 9693 FF aa 9693 FF aa 9693 FF bb 9693 FF bb 9693 FF bb 9693
|
|
|
|
FF bb 9693 FF bb 9693 FF bb 9693 GG aa 12239 GG aa 12239
|
|
|
|
GG aa 12239 GG aa 12239 GG bb 12239 GG bb 12239 GG bb 12239
|
|
|
|
GG bb 12239 HH aa 12675 HH aa 12675 HH aa 12675 HH bb 12675
|
|
|
|
HH bb 12675 HH bb 12675 HH bb 12675 HH bb 12675 HH bb 12675
|
|
|
|
II aa 15579 II aa 15579 II bb 15579 II bb 15579 II bb 15579
|
|
|
|
II bb 15579 II bb 15579 JJ aa 13551 JJ aa 13551 JJ aa 13551
|
|
|
|
JJ aa 13551 JJ bb 13551 JJ bb 13551 JJ bb 13551 JJ bb 13551}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.7.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb 2307 AA bb 2307
|
|
|
|
AA bb 2307 AA bb 2307 BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685
|
|
|
|
BB aa 4685 BB aa 4685 BB bb 7558 BB bb 7558 BB bb 7558 BB bb 7558
|
|
|
|
BB bb 7558 BB bb 7558 CC aa 9718 CC aa 9718 CC aa 9718 CC aa 9718
|
|
|
|
CC bb 9294 CC bb 9294 DD aa 7589 DD aa 7589 DD aa 7589 DD bb 4447
|
|
|
|
DD bb 4447 DD bb 4447 DD bb 4447 EE aa 5200 EE aa 5200 EE bb 4922
|
|
|
|
EE bb 4922 EE bb 4922 FF aa 5246 FF aa 5246 FF aa 5246 FF aa 5246
|
|
|
|
FF bb 4702 FF bb 4702 FF bb 4702 FF bb 4702 FF bb 4702 FF bb 4702
|
|
|
|
GG aa 7317 GG aa 7317 GG aa 7317 GG aa 7317 GG bb 7265 GG bb 7265
|
|
|
|
GG bb 7265 GG bb 7265 HH aa 7973 HH aa 7973 HH aa 7973 HH bb 6717
|
|
|
|
HH bb 6717 HH bb 6717 HH bb 6717 HH bb 6717 HH bb 6717 II aa 8314
|
|
|
|
II aa 8314 II bb 6493 II bb 6493 II bb 6493 II bb 6493 II bb 6493
|
|
|
|
JJ aa 6834 JJ aa 6834 JJ aa 6834 JJ aa 6834 JJ bb 5654 JJ bb 5654
|
|
|
|
JJ bb 5654 JJ bb 5654}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.7.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN 3 PRECEDING AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.7.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb 934 AA bb 934
|
|
|
|
AA bb 934 AA bb 934 BB aa 934 BB aa 934 BB aa 934 BB aa 934
|
|
|
|
BB aa 934 BB aa 934 BB bb 934 BB bb 934 BB bb 934 BB bb 934
|
|
|
|
BB bb 934 BB bb 934 CC aa 870 CC aa 870 CC aa 870 CC aa 870
|
|
|
|
CC bb 840 CC bb 840 DD aa 840 DD aa 840 DD aa 840 DD bb 845
|
|
|
|
DD bb 845 DD bb 845 DD bb 845 EE aa 959 EE aa 959 EE bb 959
|
|
|
|
EE bb 959 EE bb 959 FF aa 959 FF aa 959 FF aa 959 FF aa 959
|
|
|
|
FF bb 777 FF bb 777 FF bb 777 FF bb 777 FF bb 777 FF bb 777
|
|
|
|
GG aa 938 GG aa 938 GG aa 938 GG aa 938 GG bb 938 GG bb 938
|
|
|
|
GG bb 938 GG bb 938 HH aa 938 HH aa 938 HH aa 938 HH bb 979
|
|
|
|
HH bb 979 HH bb 979 HH bb 979 HH bb 979 HH bb 979 II aa 979
|
|
|
|
II aa 979 II bb 979 II bb 979 II bb 979 II bb 979 II bb 979
|
|
|
|
JJ aa 963 JJ aa 963 JJ aa 963 JJ aa 963 JJ bb 899 JJ bb 899
|
|
|
|
JJ bb 899 JJ bb 899}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.7.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb 223 AA bb 223
|
|
|
|
AA bb 223 AA bb 223 BB aa 223 BB aa 223 BB aa 223 BB aa 223
|
|
|
|
BB aa 223 BB aa 223 BB bb 223 BB bb 223 BB bb 223 BB bb 223
|
|
|
|
BB bb 223 BB bb 223 CC aa 247 CC aa 247 CC aa 247 CC aa 247
|
|
|
|
CC bb 158 CC bb 158 DD aa 158 DD aa 158 DD aa 158 DD bb 158
|
|
|
|
DD bb 158 DD bb 158 DD bb 158 EE aa 224 EE aa 224 EE bb 113
|
|
|
|
EE bb 113 EE bb 113 FF aa 113 FF aa 113 FF aa 113 FF aa 113
|
|
|
|
FF bb 113 FF bb 113 FF bb 113 FF bb 113 FF bb 113 FF bb 113
|
|
|
|
GG aa 102 GG aa 102 GG aa 102 GG aa 102 GG bb 102 GG bb 102
|
|
|
|
GG bb 102 GG bb 102 HH aa 102 HH aa 102 HH aa 102 HH bb 148
|
|
|
|
HH bb 148 HH bb 148 HH bb 148 HH bb 148 HH bb 148 II aa 133
|
|
|
|
II aa 133 II bb 133 II bb 133 II bb 133 II bb 133 II bb 133
|
|
|
|
JJ aa 133 JJ aa 133 JJ aa 133 JJ aa 133 JJ bb 113 JJ bb 113
|
|
|
|
JJ bb 113 JJ bb 113}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.7.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 3 PRECEDING AND 1 PRECEDING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685
|
|
|
|
BB aa 4685 BB bb 4685 BB bb 4685 BB bb 4685 BB bb 4685 BB bb 4685
|
|
|
|
BB bb 4685 CC aa 12025 CC aa 12025 CC aa 12025 CC aa 12025
|
|
|
|
CC bb 12025 CC bb 12025 DD aa 15147 DD aa 15147 DD aa 15147
|
|
|
|
DD bb 15147 DD bb 15147 DD bb 15147 DD bb 15147 EE aa 14494
|
|
|
|
EE aa 14494 EE bb 14494 EE bb 14494 EE bb 14494 FF aa 9693
|
|
|
|
FF aa 9693 FF aa 9693 FF aa 9693 FF bb 9693 FF bb 9693 FF bb 9693
|
|
|
|
FF bb 9693 FF bb 9693 FF bb 9693 GG aa 12239 GG aa 12239
|
|
|
|
GG aa 12239 GG aa 12239 GG bb 12239 GG bb 12239 GG bb 12239
|
|
|
|
GG bb 12239 HH aa 12675 HH aa 12675 HH aa 12675 HH bb 12675
|
|
|
|
HH bb 12675 HH bb 12675 HH bb 12675 HH bb 12675 HH bb 12675
|
|
|
|
II aa 15579 II aa 15579 II bb 15579 II bb 15579 II bb 15579
|
|
|
|
II bb 15579 II bb 15579 JJ aa 13551 JJ aa 13551 JJ aa 13551
|
|
|
|
JJ aa 13551 JJ bb 13551 JJ bb 13551 JJ bb 13551 JJ bb 13551}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.7.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 1 PRECEDING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb 2307 AA bb 2307
|
|
|
|
AA bb 2307 AA bb 2307 BB aa 4685 BB aa 4685 BB aa 4685 BB aa 4685
|
|
|
|
BB aa 4685 BB aa 4685 BB bb 7558 BB bb 7558 BB bb 7558 BB bb 7558
|
|
|
|
BB bb 7558 BB bb 7558 CC aa 9718 CC aa 9718 CC aa 9718 CC aa 9718
|
|
|
|
CC bb 9294 CC bb 9294 DD aa 7589 DD aa 7589 DD aa 7589 DD bb 4447
|
|
|
|
DD bb 4447 DD bb 4447 DD bb 4447 EE aa 5200 EE aa 5200 EE bb 4922
|
|
|
|
EE bb 4922 EE bb 4922 FF aa 5246 FF aa 5246 FF aa 5246 FF aa 5246
|
|
|
|
FF bb 4702 FF bb 4702 FF bb 4702 FF bb 4702 FF bb 4702 FF bb 4702
|
|
|
|
GG aa 7317 GG aa 7317 GG aa 7317 GG aa 7317 GG bb 7265 GG bb 7265
|
|
|
|
GG bb 7265 GG bb 7265 HH aa 7973 HH aa 7973 HH aa 7973 HH bb 6717
|
|
|
|
HH bb 6717 HH bb 6717 HH bb 6717 HH bb 6717 HH bb 6717 II aa 8314
|
|
|
|
II aa 8314 II bb 6493 II bb 6493 II bb 6493 II bb 6493 II bb 6493
|
|
|
|
JJ aa 6834 JJ aa 6834 JJ aa 6834 JJ aa 6834 JJ bb 5654 JJ bb 5654
|
|
|
|
JJ bb 5654 JJ bb 5654}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.7.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 3 PRECEDING AND 1 PRECEDING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 3 PRECEDING AND 1 PRECEDING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 1 PRECEDING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 1 PRECEDING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa {} {} {} {} AA aa {} {} {} {} AA aa {} {} {} {}
|
|
|
|
AA aa {} {} {} {} AA bb {} {} 2307 2307 AA bb {} {} 2307 2307
|
|
|
|
AA bb {} {} 2307 2307 AA bb {} {} 2307 2307 BB aa 4685 4685 4685 4685
|
|
|
|
BB aa 4685 4685 4685 4685 BB aa 4685 4685 4685 4685
|
|
|
|
BB aa 4685 4685 4685 4685 BB aa 4685 4685 4685 4685
|
|
|
|
BB aa 4685 4685 4685 4685 BB bb 4685 4685 7558 7558
|
|
|
|
BB bb 4685 4685 7558 7558 BB bb 4685 4685 7558 7558
|
|
|
|
BB bb 4685 4685 7558 7558 BB bb 4685 4685 7558 7558
|
|
|
|
BB bb 4685 4685 7558 7558 CC aa 12025 12025 9718 9718
|
|
|
|
CC aa 12025 12025 9718 9718 CC aa 12025 12025 9718 9718
|
|
|
|
CC aa 12025 12025 9718 9718 CC bb 12025 12025 9294 9294
|
|
|
|
CC bb 12025 12025 9294 9294 DD aa 15147 15147 7589 7589
|
|
|
|
DD aa 15147 15147 7589 7589 DD aa 15147 15147 7589 7589
|
|
|
|
DD bb 15147 15147 4447 4447 DD bb 15147 15147 4447 4447
|
|
|
|
DD bb 15147 15147 4447 4447 DD bb 15147 15147 4447 4447
|
|
|
|
EE aa 14494 14494 5200 5200 EE aa 14494 14494 5200 5200
|
|
|
|
EE bb 14494 14494 4922 4922 EE bb 14494 14494 4922 4922
|
|
|
|
EE bb 14494 14494 4922 4922 FF aa 9693 9693 5246 5246
|
|
|
|
FF aa 9693 9693 5246 5246 FF aa 9693 9693 5246 5246
|
|
|
|
FF aa 9693 9693 5246 5246 FF bb 9693 9693 4702 4702
|
|
|
|
FF bb 9693 9693 4702 4702 FF bb 9693 9693 4702 4702
|
|
|
|
FF bb 9693 9693 4702 4702 FF bb 9693 9693 4702 4702
|
|
|
|
FF bb 9693 9693 4702 4702 GG aa 12239 12239 7317 7317
|
|
|
|
GG aa 12239 12239 7317 7317 GG aa 12239 12239 7317 7317
|
|
|
|
GG aa 12239 12239 7317 7317 GG bb 12239 12239 7265 7265
|
|
|
|
GG bb 12239 12239 7265 7265 GG bb 12239 12239 7265 7265
|
|
|
|
GG bb 12239 12239 7265 7265 HH aa 12675 12675 7973 7973
|
|
|
|
HH aa 12675 12675 7973 7973 HH aa 12675 12675 7973 7973
|
|
|
|
HH bb 12675 12675 6717 6717 HH bb 12675 12675 6717 6717
|
|
|
|
HH bb 12675 12675 6717 6717 HH bb 12675 12675 6717 6717
|
|
|
|
HH bb 12675 12675 6717 6717 HH bb 12675 12675 6717 6717
|
|
|
|
II aa 15579 15579 8314 8314 II aa 15579 15579 8314 8314
|
|
|
|
II bb 15579 15579 6493 6493 II bb 15579 15579 6493 6493
|
|
|
|
II bb 15579 15579 6493 6493 II bb 15579 15579 6493 6493
|
|
|
|
II bb 15579 15579 6493 6493 JJ aa 13551 13551 6834 6834
|
|
|
|
JJ aa 13551 13551 6834 6834 JJ aa 13551 13551 6834 6834
|
|
|
|
JJ aa 13551 13551 6834 6834 JJ bb 13551 13551 5654 5654
|
|
|
|
JJ bb 13551 13551 5654 5654 JJ bb 13551 13551 5654 5654
|
|
|
|
JJ bb 13551 13551 5654 5654}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.8.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 3 PRECEDING AND 0 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 4685 AA aa 4685 AA aa 4685 AA aa 4685 AA bb 4685 AA bb 4685
|
|
|
|
AA bb 4685 AA bb 4685 BB aa 12025 BB aa 12025 BB aa 12025
|
|
|
|
BB aa 12025 BB aa 12025 BB aa 12025 BB bb 12025 BB bb 12025
|
|
|
|
BB bb 12025 BB bb 12025 BB bb 12025 BB bb 12025 CC aa 15147
|
|
|
|
CC aa 15147 CC aa 15147 CC aa 15147 CC bb 15147 CC bb 15147
|
|
|
|
DD aa 19179 DD aa 19179 DD aa 19179 DD bb 19179 DD bb 19179
|
|
|
|
DD bb 19179 DD bb 19179 EE aa 17033 EE aa 17033 EE bb 17033
|
|
|
|
EE bb 17033 EE bb 17033 FF aa 15361 FF aa 15361 FF aa 15361
|
|
|
|
FF aa 15361 FF bb 15361 FF bb 15361 FF bb 15361 FF bb 15361
|
|
|
|
FF bb 15361 FF bb 15361 GG aa 16707 GG aa 16707 GG aa 16707
|
|
|
|
GG aa 16707 GG bb 16707 GG bb 16707 GG bb 16707 GG bb 16707
|
|
|
|
HH aa 18118 HH aa 18118 HH aa 18118 HH bb 18118 HH bb 18118
|
|
|
|
HH bb 18118 HH bb 18118 HH bb 18118 HH bb 18118 II aa 19219
|
|
|
|
II aa 19219 II bb 19219 II bb 19219 II bb 19219 II bb 19219
|
|
|
|
II bb 19219 JJ aa 17351 JJ aa 17351 JJ aa 17351 JJ aa 17351
|
|
|
|
JJ bb 17351 JJ bb 17351 JJ bb 17351 JJ bb 17351}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.8.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 0 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 2307 AA aa 2307 AA aa 2307 AA aa 2307 AA bb 4685 AA bb 4685
|
|
|
|
AA bb 4685 AA bb 4685 BB aa 7558 BB aa 7558 BB aa 7558 BB aa 7558
|
|
|
|
BB aa 7558 BB aa 7558 BB bb 12025 BB bb 12025 BB bb 12025
|
|
|
|
BB bb 12025 BB bb 12025 BB bb 12025 CC aa 11672 CC aa 11672
|
|
|
|
CC aa 11672 CC aa 11672 CC bb 10462 CC bb 10462 DD aa 8914
|
|
|
|
DD aa 8914 DD aa 8914 DD bb 7154 DD bb 7154 DD bb 7154 DD bb 7154
|
|
|
|
EE aa 6090 EE aa 6090 EE bb 6571 EE bb 6571 EE bb 6571 FF aa 7409
|
|
|
|
FF aa 7409 FF aa 7409 FF aa 7409 FF bb 8207 FF bb 8207 FF bb 8207
|
|
|
|
FF bb 8207 FF bb 8207 FF bb 8207 GG aa 8914 GG aa 8914 GG aa 8914
|
|
|
|
GG aa 8914 GG bb 10136 GG bb 10136 GG bb 10136 GG bb 10136
|
|
|
|
HH aa 10222 HH aa 10222 HH aa 10222 HH bb 9911 HH bb 9911
|
|
|
|
HH bb 9911 HH bb 9911 HH bb 9911 HH bb 9911 II aa 9364 II aa 9364
|
|
|
|
II bb 9083 II bb 9083 II bb 9083 II bb 9083 II bb 9083 JJ aa 8848
|
|
|
|
JJ aa 8848 JJ aa 8848 JJ aa 8848 JJ bb 7440 JJ bb 7440 JJ bb 7440
|
|
|
|
JJ bb 7440}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.8.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN 3 PRECEDING AND 0 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.8.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 0 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 934 AA aa 934 AA aa 934 AA aa 934 AA bb 934 AA bb 934
|
|
|
|
AA bb 934 AA bb 934 BB aa 934 BB aa 934 BB aa 934 BB aa 934
|
|
|
|
BB aa 934 BB aa 934 BB bb 934 BB bb 934 BB bb 934 BB bb 934
|
|
|
|
BB bb 934 BB bb 934 CC aa 870 CC aa 870 CC aa 870 CC aa 870
|
|
|
|
CC bb 840 CC bb 840 DD aa 845 DD aa 845 DD aa 845 DD bb 959
|
|
|
|
DD bb 959 DD bb 959 DD bb 959 EE aa 959 EE aa 959 EE bb 959
|
|
|
|
EE bb 959 EE bb 959 FF aa 959 FF aa 959 FF aa 959 FF aa 959
|
|
|
|
FF bb 938 FF bb 938 FF bb 938 FF bb 938 FF bb 938 FF bb 938
|
|
|
|
GG aa 938 GG aa 938 GG aa 938 GG aa 938 GG bb 938 GG bb 938
|
|
|
|
GG bb 938 GG bb 938 HH aa 979 HH aa 979 HH aa 979 HH bb 979
|
|
|
|
HH bb 979 HH bb 979 HH bb 979 HH bb 979 HH bb 979 II aa 979
|
|
|
|
II aa 979 II bb 979 II bb 979 II bb 979 II bb 979 II bb 979
|
|
|
|
JJ aa 963 JJ aa 963 JJ aa 963 JJ aa 963 JJ bb 899 JJ bb 899
|
|
|
|
JJ bb 899 JJ bb 899}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.8.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 0 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 223 AA aa 223 AA aa 223 AA aa 223 AA bb 223 AA bb 223
|
|
|
|
AA bb 223 AA bb 223 BB aa 223 BB aa 223 BB aa 223 BB aa 223
|
|
|
|
BB aa 223 BB aa 223 BB bb 223 BB bb 223 BB bb 223 BB bb 223
|
|
|
|
BB bb 223 BB bb 223 CC aa 158 CC aa 158 CC aa 158 CC aa 158
|
|
|
|
CC bb 158 CC bb 158 DD aa 158 DD aa 158 DD aa 158 DD bb 158
|
|
|
|
DD bb 158 DD bb 158 DD bb 158 EE aa 113 EE aa 113 EE bb 113
|
|
|
|
EE bb 113 EE bb 113 FF aa 113 FF aa 113 FF aa 113 FF aa 113
|
|
|
|
FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102
|
|
|
|
GG aa 102 GG aa 102 GG aa 102 GG aa 102 GG bb 102 GG bb 102
|
|
|
|
GG bb 102 GG bb 102 HH aa 102 HH aa 102 HH aa 102 HH bb 133
|
|
|
|
HH bb 133 HH bb 133 HH bb 133 HH bb 133 HH bb 133 II aa 133
|
|
|
|
II aa 133 II bb 133 II bb 133 II bb 133 II bb 133 II bb 133
|
|
|
|
JJ aa 113 JJ aa 113 JJ aa 113 JJ aa 113 JJ bb 113 JJ bb 113
|
|
|
|
JJ bb 113 JJ bb 113}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.8.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 3 PRECEDING AND 0 PRECEDING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 3751 AA aa 3774 AA aa 4446 AA aa 4462 AA bb 3815 AA bb 4058
|
|
|
|
AA bb 4113 AA bb 4376 BB aa 11263 BB aa 11365 BB aa 11613
|
|
|
|
BB aa 11626 BB aa 11632 BB aa 11778 BB bb 11185 BB bb 11233
|
|
|
|
BB bb 11239 BB bb 11314 BB bb 11320 BB bb 11392 CC aa 14388
|
|
|
|
CC aa 14540 CC aa 14717 CC aa 14989 CC bb 14325 CC bb 14801
|
|
|
|
DD aa 18334 DD aa 18923 DD aa 18955 DD bb 18220 DD bb 18385
|
|
|
|
DD bb 18463 DD bb 18941 EE aa 16256 EE aa 16920 EE bb 16265
|
|
|
|
EE bb 16404 EE bb 16781 FF aa 14691 FF aa 14694 FF aa 14743
|
|
|
|
FF aa 15153 FF bb 14423 FF bb 14491 FF bb 14635 FF bb 14787
|
|
|
|
FF bb 15066 FF bb 15259 GG aa 16073 GG aa 16227 GG aa 16372
|
|
|
|
GG aa 16559 GG bb 15769 GG bb 15778 GG bb 15863 GG bb 16547
|
|
|
|
HH aa 17139 HH aa 17328 HH aa 17638 HH bb 17155 HH bb 17388
|
|
|
|
HH bb 17435 HH bb 17763 HH bb 17788 HH bb 17985 II aa 18567
|
|
|
|
II aa 18821 II bb 18414 II bb 18548 II bb 18776 II bb 18798
|
|
|
|
II bb 18969 JJ aa 16452 JJ aa 16583 JJ aa 17117 JJ aa 17238
|
|
|
|
JJ bb 16512 JJ bb 16997 JJ bb 17015 JJ bb 17094}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.8.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 0 PRECEDING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1373 AA aa 1396 AA aa 2068 AA aa 2084 AA bb 3815 AA bb 4058
|
|
|
|
AA bb 4113 AA bb 4376 BB aa 6796 BB aa 6898 BB aa 7146 BB aa 7159
|
|
|
|
BB aa 7165 BB aa 7311 BB bb 11185 BB bb 11233 BB bb 11239
|
|
|
|
BB bb 11314 BB bb 11320 BB bb 11392 CC aa 10913 CC aa 11065
|
|
|
|
CC aa 11242 CC aa 11514 CC bb 9640 CC bb 10116 DD aa 8069
|
|
|
|
DD aa 8658 DD aa 8690 DD bb 6195 DD bb 6360 DD bb 6438 DD bb 6916
|
|
|
|
EE aa 5313 EE aa 5977 EE bb 5803 EE bb 5942 EE bb 6319 FF aa 6739
|
|
|
|
FF aa 6742 FF aa 6791 FF aa 7201 FF bb 7269 FF bb 7337 FF bb 7481
|
|
|
|
FF bb 7633 FF bb 7912 FF bb 8105 GG aa 8280 GG aa 8434 GG aa 8579
|
|
|
|
GG aa 8766 GG bb 9198 GG bb 9207 GG bb 9292 GG bb 9976 HH aa 9243
|
|
|
|
HH aa 9432 HH aa 9742 HH bb 8948 HH bb 9181 HH bb 9228 HH bb 9556
|
|
|
|
HH bb 9581 HH bb 9778 II aa 8712 II aa 8966 II bb 8278 II bb 8412
|
|
|
|
II bb 8640 II bb 8662 II bb 8833 JJ aa 7949 JJ aa 8080 JJ aa 8614
|
|
|
|
JJ aa 8735 JJ bb 6601 JJ bb 7086 JJ bb 7104 JJ bb 7183}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.8.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 3 PRECEDING AND 0 PRECEDING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 3 PRECEDING AND 0 PRECEDING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 0 PRECEDING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 0 PRECEDING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa 3751 4685 1373 2307 AA aa 3774 4685 1396 2307
|
|
|
|
AA aa 4446 4685 2068 2307 AA aa 4462 4685 2084 2307
|
|
|
|
AA bb 3815 4685 3815 4685 AA bb 4058 4685 4058 4685
|
|
|
|
AA bb 4113 4685 4113 4685 AA bb 4376 4685 4376 4685
|
|
|
|
BB aa 11263 12025 6796 7558 BB aa 11365 12025 6898 7558
|
|
|
|
BB aa 11613 12025 7146 7558 BB aa 11626 12025 7159 7558
|
|
|
|
BB aa 11632 12025 7165 7558 BB aa 11778 12025 7311 7558
|
|
|
|
BB bb 11185 12025 11185 12025 BB bb 11233 12025 11233 12025
|
|
|
|
BB bb 11239 12025 11239 12025 BB bb 11314 12025 11314 12025
|
|
|
|
BB bb 11320 12025 11320 12025 BB bb 11392 12025 11392 12025
|
|
|
|
CC aa 14388 15147 10913 11672 CC aa 14540 15147 11065 11672
|
|
|
|
CC aa 14717 15147 11242 11672 CC aa 14989 15147 11514 11672
|
|
|
|
CC bb 14325 15147 9640 10462 CC bb 14801 15147 10116 10462
|
|
|
|
DD aa 18334 19179 8069 8914 DD aa 18923 19179 8658 8914
|
|
|
|
DD aa 18955 19179 8690 8914 DD bb 18220 19179 6195 7154
|
|
|
|
DD bb 18385 19179 6360 7154 DD bb 18463 19179 6438 7154
|
|
|
|
DD bb 18941 19179 6916 7154 EE aa 16256 17033 5313 6090
|
|
|
|
EE aa 16920 17033 5977 6090 EE bb 16265 17033 5803 6571
|
|
|
|
EE bb 16404 17033 5942 6571 EE bb 16781 17033 6319 6571
|
|
|
|
FF aa 14691 15361 6739 7409 FF aa 14694 15361 6742 7409
|
|
|
|
FF aa 14743 15361 6791 7409 FF aa 15153 15361 7201 7409
|
|
|
|
FF bb 14423 15361 7269 8207 FF bb 14491 15361 7337 8207
|
|
|
|
FF bb 14635 15361 7481 8207 FF bb 14787 15361 7633 8207
|
|
|
|
FF bb 15066 15361 7912 8207 FF bb 15259 15361 8105 8207
|
|
|
|
GG aa 16073 16707 8280 8914 GG aa 16227 16707 8434 8914
|
|
|
|
GG aa 16372 16707 8579 8914 GG aa 16559 16707 8766 8914
|
|
|
|
GG bb 15769 16707 9198 10136 GG bb 15778 16707 9207 10136
|
|
|
|
GG bb 15863 16707 9292 10136 GG bb 16547 16707 9976 10136
|
|
|
|
HH aa 17139 18118 9243 10222 HH aa 17328 18118 9432 10222
|
|
|
|
HH aa 17638 18118 9742 10222 HH bb 17155 18118 8948 9911
|
|
|
|
HH bb 17388 18118 9181 9911 HH bb 17435 18118 9228 9911
|
|
|
|
HH bb 17763 18118 9556 9911 HH bb 17788 18118 9581 9911
|
|
|
|
HH bb 17985 18118 9778 9911 II aa 18567 19219 8712 9364
|
|
|
|
II aa 18821 19219 8966 9364 II bb 18414 19219 8278 9083
|
|
|
|
II bb 18548 19219 8412 9083 II bb 18776 19219 8640 9083
|
|
|
|
II bb 18798 19219 8662 9083 II bb 18969 19219 8833 9083
|
|
|
|
JJ aa 16452 17351 7949 8848 JJ aa 16583 17351 8080 8848
|
|
|
|
JJ aa 17117 17351 8614 8848 JJ aa 17238 17351 8735 8848
|
|
|
|
JJ bb 16512 17351 6601 7440 JJ bb 16997 17351 7086 7440
|
|
|
|
JJ bb 17015 17351 7104 7440 JJ bb 17094 17351 7183 7440}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.9.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 2 PRECEDING AND CURRENT ROW ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 4685 AA aa 4685 AA aa 4685 AA aa 4685 AA bb 4685 AA bb 4685
|
|
|
|
AA bb 4685 AA bb 4685 BB aa 12025 BB aa 12025 BB aa 12025
|
|
|
|
BB aa 12025 BB aa 12025 BB aa 12025 BB bb 12025 BB bb 12025
|
|
|
|
BB bb 12025 BB bb 12025 BB bb 12025 BB bb 12025 CC aa 15147
|
|
|
|
CC aa 15147 CC aa 15147 CC aa 15147 CC bb 15147 CC bb 15147
|
|
|
|
DD aa 14494 DD aa 14494 DD aa 14494 DD bb 14494 DD bb 14494
|
|
|
|
DD bb 14494 DD bb 14494 EE aa 9693 EE aa 9693 EE bb 9693
|
|
|
|
EE bb 9693 EE bb 9693 FF aa 12239 FF aa 12239 FF aa 12239
|
|
|
|
FF aa 12239 FF bb 12239 FF bb 12239 FF bb 12239 FF bb 12239
|
|
|
|
FF bb 12239 FF bb 12239 GG aa 12675 GG aa 12675 GG aa 12675
|
|
|
|
GG aa 12675 GG bb 12675 GG bb 12675 GG bb 12675 GG bb 12675
|
|
|
|
HH aa 15579 HH aa 15579 HH aa 15579 HH bb 15579 HH bb 15579
|
|
|
|
HH bb 15579 HH bb 15579 HH bb 15579 HH bb 15579 II aa 13551
|
|
|
|
II aa 13551 II bb 13551 II bb 13551 II bb 13551 II bb 13551
|
|
|
|
II bb 13551 JJ aa 12883 JJ aa 12883 JJ aa 12883 JJ aa 12883
|
|
|
|
JJ bb 12883 JJ bb 12883 JJ bb 12883 JJ bb 12883}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.9.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND CURRENT ROW ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 2307 AA aa 2307 AA aa 2307 AA aa 2307 AA bb 4685 AA bb 4685
|
|
|
|
AA bb 4685 AA bb 4685 BB aa 7558 BB aa 7558 BB aa 7558 BB aa 7558
|
|
|
|
BB aa 7558 BB aa 7558 BB bb 9718 BB bb 9718 BB bb 9718 BB bb 9718
|
|
|
|
BB bb 9718 BB bb 9718 CC aa 9294 CC aa 9294 CC aa 9294 CC aa 9294
|
|
|
|
CC bb 7589 CC bb 7589 DD aa 4447 DD aa 4447 DD aa 4447 DD bb 5200
|
|
|
|
DD bb 5200 DD bb 5200 DD bb 5200 EE aa 4922 EE aa 4922 EE bb 5246
|
|
|
|
EE bb 5246 EE bb 5246 FF aa 4702 FF aa 4702 FF aa 4702 FF aa 4702
|
|
|
|
FF bb 7317 FF bb 7317 FF bb 7317 FF bb 7317 FF bb 7317 FF bb 7317
|
|
|
|
GG aa 7265 GG aa 7265 GG aa 7265 GG aa 7265 GG bb 7973 GG bb 7973
|
|
|
|
GG bb 7973 GG bb 7973 HH aa 6717 HH aa 6717 HH aa 6717 HH bb 8314
|
|
|
|
HH bb 8314 HH bb 8314 HH bb 8314 HH bb 8314 HH bb 8314 II aa 6493
|
|
|
|
II aa 6493 II bb 6834 II bb 6834 II bb 6834 II bb 6834 II bb 6834
|
|
|
|
JJ aa 5654 JJ aa 5654 JJ aa 5654 JJ aa 5654 JJ bb 6390 JJ bb 6390
|
|
|
|
JJ bb 6390 JJ bb 6390}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.9.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN 2 PRECEDING AND CURRENT ROW ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.9.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND CURRENT ROW ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 934 AA aa 934 AA aa 934 AA aa 934 AA bb 934 AA bb 934
|
|
|
|
AA bb 934 AA bb 934 BB aa 934 BB aa 934 BB aa 934 BB aa 934
|
|
|
|
BB aa 934 BB aa 934 BB bb 870 BB bb 870 BB bb 870 BB bb 870
|
|
|
|
BB bb 870 BB bb 870 CC aa 840 CC aa 840 CC aa 840 CC aa 840
|
|
|
|
CC bb 840 CC bb 840 DD aa 845 DD aa 845 DD aa 845 DD bb 959
|
|
|
|
DD bb 959 DD bb 959 DD bb 959 EE aa 959 EE aa 959 EE bb 959
|
|
|
|
EE bb 959 EE bb 959 FF aa 777 FF aa 777 FF aa 777 FF aa 777
|
|
|
|
FF bb 938 FF bb 938 FF bb 938 FF bb 938 FF bb 938 FF bb 938
|
|
|
|
GG aa 938 GG aa 938 GG aa 938 GG aa 938 GG bb 938 GG bb 938
|
|
|
|
GG bb 938 GG bb 938 HH aa 979 HH aa 979 HH aa 979 HH bb 979
|
|
|
|
HH bb 979 HH bb 979 HH bb 979 HH bb 979 HH bb 979 II aa 979
|
|
|
|
II aa 979 II bb 963 II bb 963 II bb 963 II bb 963 II bb 963
|
|
|
|
JJ aa 899 JJ aa 899 JJ aa 899 JJ aa 899 JJ bb 899 JJ bb 899
|
|
|
|
JJ bb 899 JJ bb 899}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.9.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND CURRENT ROW ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 223 AA aa 223 AA aa 223 AA aa 223 AA bb 223 AA bb 223
|
|
|
|
AA bb 223 AA bb 223 BB aa 223 BB aa 223 BB aa 223 BB aa 223
|
|
|
|
BB aa 223 BB aa 223 BB bb 247 BB bb 247 BB bb 247 BB bb 247
|
|
|
|
BB bb 247 BB bb 247 CC aa 158 CC aa 158 CC aa 158 CC aa 158
|
|
|
|
CC bb 158 CC bb 158 DD aa 158 DD aa 158 DD aa 158 DD bb 224
|
|
|
|
DD bb 224 DD bb 224 DD bb 224 EE aa 113 EE aa 113 EE bb 113
|
|
|
|
EE bb 113 EE bb 113 FF aa 113 FF aa 113 FF aa 113 FF aa 113
|
|
|
|
FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102
|
|
|
|
GG aa 102 GG aa 102 GG aa 102 GG aa 102 GG bb 102 GG bb 102
|
|
|
|
GG bb 102 GG bb 102 HH aa 148 HH aa 148 HH aa 148 HH bb 133
|
|
|
|
HH bb 133 HH bb 133 HH bb 133 HH bb 133 HH bb 133 II aa 133
|
|
|
|
II aa 133 II bb 133 II bb 133 II bb 133 II bb 133 II bb 133
|
|
|
|
JJ aa 113 JJ aa 113 JJ aa 113 JJ aa 113 JJ bb 113 JJ bb 113
|
|
|
|
JJ bb 113 JJ bb 113}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.9.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 2 PRECEDING AND CURRENT ROW EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 3751 AA aa 3774 AA aa 4446 AA aa 4462 AA bb 3815 AA bb 4058
|
|
|
|
AA bb 4113 AA bb 4376 BB aa 11263 BB aa 11365 BB aa 11613
|
|
|
|
BB aa 11626 BB aa 11632 BB aa 11778 BB bb 11185 BB bb 11233
|
|
|
|
BB bb 11239 BB bb 11314 BB bb 11320 BB bb 11392 CC aa 14388
|
|
|
|
CC aa 14540 CC aa 14717 CC aa 14989 CC bb 14325 CC bb 14801
|
|
|
|
DD aa 13649 DD aa 14238 DD aa 14270 DD bb 13535 DD bb 13700
|
|
|
|
DD bb 13778 DD bb 14256 EE aa 8916 EE aa 9580 EE bb 8925
|
|
|
|
EE bb 9064 EE bb 9441 FF aa 11569 FF aa 11572 FF aa 11621
|
|
|
|
FF aa 12031 FF bb 11301 FF bb 11369 FF bb 11513 FF bb 11665
|
|
|
|
FF bb 11944 FF bb 12137 GG aa 12041 GG aa 12195 GG aa 12340
|
|
|
|
GG aa 12527 GG bb 11737 GG bb 11746 GG bb 11831 GG bb 12515
|
|
|
|
HH aa 14600 HH aa 14789 HH aa 15099 HH bb 14616 HH bb 14849
|
|
|
|
HH bb 14896 HH bb 15224 HH bb 15249 HH bb 15446 II aa 12899
|
|
|
|
II aa 13153 II bb 12746 II bb 12880 II bb 13108 II bb 13130
|
|
|
|
II bb 13301 JJ aa 11984 JJ aa 12115 JJ aa 12649 JJ aa 12770
|
|
|
|
JJ bb 12044 JJ bb 12529 JJ bb 12547 JJ bb 12626}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.9.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND CURRENT ROW EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1373 AA aa 1396 AA aa 2068 AA aa 2084 AA bb 3815 AA bb 4058
|
|
|
|
AA bb 4113 AA bb 4376 BB aa 6796 BB aa 6898 BB aa 7146 BB aa 7159
|
|
|
|
BB aa 7165 BB aa 7311 BB bb 8878 BB bb 8926 BB bb 8932 BB bb 9007
|
|
|
|
BB bb 9013 BB bb 9085 CC aa 8535 CC aa 8687 CC aa 8864 CC aa 9136
|
|
|
|
CC bb 6767 CC bb 7243 DD aa 3602 DD aa 4191 DD aa 4223 DD bb 4241
|
|
|
|
DD bb 4406 DD bb 4484 DD bb 4962 EE aa 4145 EE aa 4809 EE bb 4478
|
|
|
|
EE bb 4617 EE bb 4994 FF aa 4032 FF aa 4035 FF aa 4084 FF aa 4494
|
|
|
|
FF bb 6379 FF bb 6447 FF bb 6591 FF bb 6743 FF bb 7022 FF bb 7215
|
|
|
|
GG aa 6631 GG aa 6785 GG aa 6930 GG aa 7117 GG bb 7035 GG bb 7044
|
|
|
|
GG bb 7129 GG bb 7813 HH aa 5738 HH aa 5927 HH aa 6237 HH bb 7351
|
|
|
|
HH bb 7584 HH bb 7631 HH bb 7959 HH bb 7984 HH bb 8181 II aa 5841
|
|
|
|
II aa 6095 II bb 6029 II bb 6163 II bb 6391 II bb 6413 II bb 6584
|
|
|
|
JJ aa 4755 JJ aa 4886 JJ aa 5420 JJ aa 5541 JJ bb 5551 JJ bb 6036
|
|
|
|
JJ bb 6054 JJ bb 6133}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.9.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 2 PRECEDING AND CURRENT ROW EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 2 PRECEDING AND CURRENT ROW ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND CURRENT ROW EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND CURRENT ROW )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa 3751 4685 1373 2307 AA aa 3774 4685 1396 2307
|
|
|
|
AA aa 4446 4685 2068 2307 AA aa 4462 4685 2084 2307
|
|
|
|
AA bb 3815 4685 3815 4685 AA bb 4058 4685 4058 4685
|
|
|
|
AA bb 4113 4685 4113 4685 AA bb 4376 4685 4376 4685
|
|
|
|
BB aa 11263 12025 6796 7558 BB aa 11365 12025 6898 7558
|
|
|
|
BB aa 11613 12025 7146 7558 BB aa 11626 12025 7159 7558
|
|
|
|
BB aa 11632 12025 7165 7558 BB aa 11778 12025 7311 7558
|
|
|
|
BB bb 11185 12025 8878 9718 BB bb 11233 12025 8926 9718
|
|
|
|
BB bb 11239 12025 8932 9718 BB bb 11314 12025 9007 9718
|
|
|
|
BB bb 11320 12025 9013 9718 BB bb 11392 12025 9085 9718
|
|
|
|
CC aa 14388 15147 8535 9294 CC aa 14540 15147 8687 9294
|
|
|
|
CC aa 14717 15147 8864 9294 CC aa 14989 15147 9136 9294
|
|
|
|
CC bb 14325 15147 6767 7589 CC bb 14801 15147 7243 7589
|
|
|
|
DD aa 13649 14494 3602 4447 DD aa 14238 14494 4191 4447
|
|
|
|
DD aa 14270 14494 4223 4447 DD bb 13535 14494 4241 5200
|
|
|
|
DD bb 13700 14494 4406 5200 DD bb 13778 14494 4484 5200
|
|
|
|
DD bb 14256 14494 4962 5200 EE aa 8916 9693 4145 4922
|
|
|
|
EE aa 9580 9693 4809 4922 EE bb 8925 9693 4478 5246
|
|
|
|
EE bb 9064 9693 4617 5246 EE bb 9441 9693 4994 5246
|
|
|
|
FF aa 11569 12239 4032 4702 FF aa 11572 12239 4035 4702
|
|
|
|
FF aa 11621 12239 4084 4702 FF aa 12031 12239 4494 4702
|
|
|
|
FF bb 11301 12239 6379 7317 FF bb 11369 12239 6447 7317
|
|
|
|
FF bb 11513 12239 6591 7317 FF bb 11665 12239 6743 7317
|
|
|
|
FF bb 11944 12239 7022 7317 FF bb 12137 12239 7215 7317
|
|
|
|
GG aa 12041 12675 6631 7265 GG aa 12195 12675 6785 7265
|
|
|
|
GG aa 12340 12675 6930 7265 GG aa 12527 12675 7117 7265
|
|
|
|
GG bb 11737 12675 7035 7973 GG bb 11746 12675 7044 7973
|
|
|
|
GG bb 11831 12675 7129 7973 GG bb 12515 12675 7813 7973
|
|
|
|
HH aa 14600 15579 5738 6717 HH aa 14789 15579 5927 6717
|
|
|
|
HH aa 15099 15579 6237 6717 HH bb 14616 15579 7351 8314
|
|
|
|
HH bb 14849 15579 7584 8314 HH bb 14896 15579 7631 8314
|
|
|
|
HH bb 15224 15579 7959 8314 HH bb 15249 15579 7984 8314
|
|
|
|
HH bb 15446 15579 8181 8314 II aa 12899 13551 5841 6493
|
|
|
|
II aa 13153 13551 6095 6493 II bb 12746 13551 6029 6834
|
|
|
|
II bb 12880 13551 6163 6834 II bb 13108 13551 6391 6834
|
|
|
|
II bb 13130 13551 6413 6834 II bb 13301 13551 6584 6834
|
|
|
|
JJ aa 11984 12883 4755 5654 JJ aa 12115 12883 4886 5654
|
|
|
|
JJ aa 12649 12883 5420 5654 JJ aa 12770 12883 5541 5654
|
|
|
|
JJ bb 12044 12883 5551 6390 JJ bb 12529 12883 6036 6390
|
|
|
|
JJ bb 12547 12883 6054 6390 JJ bb 12626 12883 6133 6390}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.10.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 3 PRECEDING AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 4685 AA aa 4685 AA aa 4685 AA aa 4685 AA bb 4685 AA bb 4685
|
|
|
|
AA bb 4685 AA bb 4685 BB aa 12025 BB aa 12025 BB aa 12025
|
|
|
|
BB aa 12025 BB aa 12025 BB aa 12025 BB bb 12025 BB bb 12025
|
|
|
|
BB bb 12025 BB bb 12025 BB bb 12025 BB bb 12025 CC aa 15147
|
|
|
|
CC aa 15147 CC aa 15147 CC aa 15147 CC bb 15147 CC bb 15147
|
|
|
|
DD aa 19179 DD aa 19179 DD aa 19179 DD bb 19179 DD bb 19179
|
|
|
|
DD bb 19179 DD bb 19179 EE aa 17033 EE aa 17033 EE bb 17033
|
|
|
|
EE bb 17033 EE bb 17033 FF aa 15361 FF aa 15361 FF aa 15361
|
|
|
|
FF aa 15361 FF bb 15361 FF bb 15361 FF bb 15361 FF bb 15361
|
|
|
|
FF bb 15361 FF bb 15361 GG aa 16707 GG aa 16707 GG aa 16707
|
|
|
|
GG aa 16707 GG bb 16707 GG bb 16707 GG bb 16707 GG bb 16707
|
|
|
|
HH aa 18118 HH aa 18118 HH aa 18118 HH bb 18118 HH bb 18118
|
|
|
|
HH bb 18118 HH bb 18118 HH bb 18118 HH bb 18118 II aa 19219
|
|
|
|
II aa 19219 II bb 19219 II bb 19219 II bb 19219 II bb 19219
|
|
|
|
II bb 19219 JJ aa 17351 JJ aa 17351 JJ aa 17351 JJ aa 17351
|
|
|
|
JJ bb 17351 JJ bb 17351 JJ bb 17351 JJ bb 17351}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.10.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 2307 AA aa 2307 AA aa 2307 AA aa 2307 AA bb 4685 AA bb 4685
|
|
|
|
AA bb 4685 AA bb 4685 BB aa 7558 BB aa 7558 BB aa 7558 BB aa 7558
|
|
|
|
BB aa 7558 BB aa 7558 BB bb 12025 BB bb 12025 BB bb 12025
|
|
|
|
BB bb 12025 BB bb 12025 BB bb 12025 CC aa 11672 CC aa 11672
|
|
|
|
CC aa 11672 CC aa 11672 CC bb 10462 CC bb 10462 DD aa 8914
|
|
|
|
DD aa 8914 DD aa 8914 DD bb 7154 DD bb 7154 DD bb 7154 DD bb 7154
|
|
|
|
EE aa 6090 EE aa 6090 EE bb 6571 EE bb 6571 EE bb 6571 FF aa 7409
|
|
|
|
FF aa 7409 FF aa 7409 FF aa 7409 FF bb 8207 FF bb 8207 FF bb 8207
|
|
|
|
FF bb 8207 FF bb 8207 FF bb 8207 GG aa 8914 GG aa 8914 GG aa 8914
|
|
|
|
GG aa 8914 GG bb 10136 GG bb 10136 GG bb 10136 GG bb 10136
|
|
|
|
HH aa 10222 HH aa 10222 HH aa 10222 HH bb 9911 HH bb 9911
|
|
|
|
HH bb 9911 HH bb 9911 HH bb 9911 HH bb 9911 II aa 9364 II aa 9364
|
|
|
|
II bb 9083 II bb 9083 II bb 9083 II bb 9083 II bb 9083 JJ aa 8848
|
|
|
|
JJ aa 8848 JJ aa 8848 JJ aa 8848 JJ bb 7440 JJ bb 7440 JJ bb 7440
|
|
|
|
JJ bb 7440}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.10.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN 3 PRECEDING AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.10.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 934 AA aa 934 AA aa 934 AA aa 934 AA bb 934 AA bb 934
|
|
|
|
AA bb 934 AA bb 934 BB aa 934 BB aa 934 BB aa 934 BB aa 934
|
|
|
|
BB aa 934 BB aa 934 BB bb 934 BB bb 934 BB bb 934 BB bb 934
|
|
|
|
BB bb 934 BB bb 934 CC aa 870 CC aa 870 CC aa 870 CC aa 870
|
|
|
|
CC bb 840 CC bb 840 DD aa 845 DD aa 845 DD aa 845 DD bb 959
|
|
|
|
DD bb 959 DD bb 959 DD bb 959 EE aa 959 EE aa 959 EE bb 959
|
|
|
|
EE bb 959 EE bb 959 FF aa 959 FF aa 959 FF aa 959 FF aa 959
|
|
|
|
FF bb 938 FF bb 938 FF bb 938 FF bb 938 FF bb 938 FF bb 938
|
|
|
|
GG aa 938 GG aa 938 GG aa 938 GG aa 938 GG bb 938 GG bb 938
|
|
|
|
GG bb 938 GG bb 938 HH aa 979 HH aa 979 HH aa 979 HH bb 979
|
|
|
|
HH bb 979 HH bb 979 HH bb 979 HH bb 979 HH bb 979 II aa 979
|
|
|
|
II aa 979 II bb 979 II bb 979 II bb 979 II bb 979 II bb 979
|
|
|
|
JJ aa 963 JJ aa 963 JJ aa 963 JJ aa 963 JJ bb 899 JJ bb 899
|
|
|
|
JJ bb 899 JJ bb 899}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.10.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 223 AA aa 223 AA aa 223 AA aa 223 AA bb 223 AA bb 223
|
|
|
|
AA bb 223 AA bb 223 BB aa 223 BB aa 223 BB aa 223 BB aa 223
|
|
|
|
BB aa 223 BB aa 223 BB bb 223 BB bb 223 BB bb 223 BB bb 223
|
|
|
|
BB bb 223 BB bb 223 CC aa 158 CC aa 158 CC aa 158 CC aa 158
|
|
|
|
CC bb 158 CC bb 158 DD aa 158 DD aa 158 DD aa 158 DD bb 158
|
|
|
|
DD bb 158 DD bb 158 DD bb 158 EE aa 113 EE aa 113 EE bb 113
|
|
|
|
EE bb 113 EE bb 113 FF aa 113 FF aa 113 FF aa 113 FF aa 113
|
|
|
|
FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102
|
|
|
|
GG aa 102 GG aa 102 GG aa 102 GG aa 102 GG bb 102 GG bb 102
|
|
|
|
GG bb 102 GG bb 102 HH aa 102 HH aa 102 HH aa 102 HH bb 133
|
|
|
|
HH bb 133 HH bb 133 HH bb 133 HH bb 133 HH bb 133 II aa 133
|
|
|
|
II aa 133 II bb 133 II bb 133 II bb 133 II bb 133 II bb 133
|
|
|
|
JJ aa 113 JJ aa 113 JJ aa 113 JJ aa 113 JJ bb 113 JJ bb 113
|
|
|
|
JJ bb 113 JJ bb 113}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.10.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 3 PRECEDING AND 0 FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 3751 AA aa 3774 AA aa 4446 AA aa 4462 AA bb 3815 AA bb 4058
|
|
|
|
AA bb 4113 AA bb 4376 BB aa 11263 BB aa 11365 BB aa 11613
|
|
|
|
BB aa 11626 BB aa 11632 BB aa 11778 BB bb 11185 BB bb 11233
|
|
|
|
BB bb 11239 BB bb 11314 BB bb 11320 BB bb 11392 CC aa 14388
|
|
|
|
CC aa 14540 CC aa 14717 CC aa 14989 CC bb 14325 CC bb 14801
|
|
|
|
DD aa 18334 DD aa 18923 DD aa 18955 DD bb 18220 DD bb 18385
|
|
|
|
DD bb 18463 DD bb 18941 EE aa 16256 EE aa 16920 EE bb 16265
|
|
|
|
EE bb 16404 EE bb 16781 FF aa 14691 FF aa 14694 FF aa 14743
|
|
|
|
FF aa 15153 FF bb 14423 FF bb 14491 FF bb 14635 FF bb 14787
|
|
|
|
FF bb 15066 FF bb 15259 GG aa 16073 GG aa 16227 GG aa 16372
|
|
|
|
GG aa 16559 GG bb 15769 GG bb 15778 GG bb 15863 GG bb 16547
|
|
|
|
HH aa 17139 HH aa 17328 HH aa 17638 HH bb 17155 HH bb 17388
|
|
|
|
HH bb 17435 HH bb 17763 HH bb 17788 HH bb 17985 II aa 18567
|
|
|
|
II aa 18821 II bb 18414 II bb 18548 II bb 18776 II bb 18798
|
|
|
|
II bb 18969 JJ aa 16452 JJ aa 16583 JJ aa 17117 JJ aa 17238
|
|
|
|
JJ bb 16512 JJ bb 16997 JJ bb 17015 JJ bb 17094}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.10.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 0 FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1373 AA aa 1396 AA aa 2068 AA aa 2084 AA bb 3815 AA bb 4058
|
|
|
|
AA bb 4113 AA bb 4376 BB aa 6796 BB aa 6898 BB aa 7146 BB aa 7159
|
|
|
|
BB aa 7165 BB aa 7311 BB bb 11185 BB bb 11233 BB bb 11239
|
|
|
|
BB bb 11314 BB bb 11320 BB bb 11392 CC aa 10913 CC aa 11065
|
|
|
|
CC aa 11242 CC aa 11514 CC bb 9640 CC bb 10116 DD aa 8069
|
|
|
|
DD aa 8658 DD aa 8690 DD bb 6195 DD bb 6360 DD bb 6438 DD bb 6916
|
|
|
|
EE aa 5313 EE aa 5977 EE bb 5803 EE bb 5942 EE bb 6319 FF aa 6739
|
|
|
|
FF aa 6742 FF aa 6791 FF aa 7201 FF bb 7269 FF bb 7337 FF bb 7481
|
|
|
|
FF bb 7633 FF bb 7912 FF bb 8105 GG aa 8280 GG aa 8434 GG aa 8579
|
|
|
|
GG aa 8766 GG bb 9198 GG bb 9207 GG bb 9292 GG bb 9976 HH aa 9243
|
|
|
|
HH aa 9432 HH aa 9742 HH bb 8948 HH bb 9181 HH bb 9228 HH bb 9556
|
|
|
|
HH bb 9581 HH bb 9778 II aa 8712 II aa 8966 II bb 8278 II bb 8412
|
|
|
|
II bb 8640 II bb 8662 II bb 8833 JJ aa 7949 JJ aa 8080 JJ aa 8614
|
|
|
|
JJ aa 8735 JJ bb 6601 JJ bb 7086 JJ bb 7104 JJ bb 7183}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.10.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 3 PRECEDING AND 0 FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 3 PRECEDING AND 0 FOLLOWING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 0 FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 3 PRECEDING AND 0 FOLLOWING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa 3751 4685 1373 2307 AA aa 3774 4685 1396 2307
|
|
|
|
AA aa 4446 4685 2068 2307 AA aa 4462 4685 2084 2307
|
|
|
|
AA bb 3815 4685 3815 4685 AA bb 4058 4685 4058 4685
|
|
|
|
AA bb 4113 4685 4113 4685 AA bb 4376 4685 4376 4685
|
|
|
|
BB aa 11263 12025 6796 7558 BB aa 11365 12025 6898 7558
|
|
|
|
BB aa 11613 12025 7146 7558 BB aa 11626 12025 7159 7558
|
|
|
|
BB aa 11632 12025 7165 7558 BB aa 11778 12025 7311 7558
|
|
|
|
BB bb 11185 12025 11185 12025 BB bb 11233 12025 11233 12025
|
|
|
|
BB bb 11239 12025 11239 12025 BB bb 11314 12025 11314 12025
|
|
|
|
BB bb 11320 12025 11320 12025 BB bb 11392 12025 11392 12025
|
|
|
|
CC aa 14388 15147 10913 11672 CC aa 14540 15147 11065 11672
|
|
|
|
CC aa 14717 15147 11242 11672 CC aa 14989 15147 11514 11672
|
|
|
|
CC bb 14325 15147 9640 10462 CC bb 14801 15147 10116 10462
|
|
|
|
DD aa 18334 19179 8069 8914 DD aa 18923 19179 8658 8914
|
|
|
|
DD aa 18955 19179 8690 8914 DD bb 18220 19179 6195 7154
|
|
|
|
DD bb 18385 19179 6360 7154 DD bb 18463 19179 6438 7154
|
|
|
|
DD bb 18941 19179 6916 7154 EE aa 16256 17033 5313 6090
|
|
|
|
EE aa 16920 17033 5977 6090 EE bb 16265 17033 5803 6571
|
|
|
|
EE bb 16404 17033 5942 6571 EE bb 16781 17033 6319 6571
|
|
|
|
FF aa 14691 15361 6739 7409 FF aa 14694 15361 6742 7409
|
|
|
|
FF aa 14743 15361 6791 7409 FF aa 15153 15361 7201 7409
|
|
|
|
FF bb 14423 15361 7269 8207 FF bb 14491 15361 7337 8207
|
|
|
|
FF bb 14635 15361 7481 8207 FF bb 14787 15361 7633 8207
|
|
|
|
FF bb 15066 15361 7912 8207 FF bb 15259 15361 8105 8207
|
|
|
|
GG aa 16073 16707 8280 8914 GG aa 16227 16707 8434 8914
|
|
|
|
GG aa 16372 16707 8579 8914 GG aa 16559 16707 8766 8914
|
|
|
|
GG bb 15769 16707 9198 10136 GG bb 15778 16707 9207 10136
|
|
|
|
GG bb 15863 16707 9292 10136 GG bb 16547 16707 9976 10136
|
|
|
|
HH aa 17139 18118 9243 10222 HH aa 17328 18118 9432 10222
|
|
|
|
HH aa 17638 18118 9742 10222 HH bb 17155 18118 8948 9911
|
|
|
|
HH bb 17388 18118 9181 9911 HH bb 17435 18118 9228 9911
|
|
|
|
HH bb 17763 18118 9556 9911 HH bb 17788 18118 9581 9911
|
|
|
|
HH bb 17985 18118 9778 9911 II aa 18567 19219 8712 9364
|
|
|
|
II aa 18821 19219 8966 9364 II bb 18414 19219 8278 9083
|
|
|
|
II bb 18548 19219 8412 9083 II bb 18776 19219 8640 9083
|
|
|
|
II bb 18798 19219 8662 9083 II bb 18969 19219 8833 9083
|
|
|
|
JJ aa 16452 17351 7949 8848 JJ aa 16583 17351 8080 8848
|
|
|
|
JJ aa 17117 17351 8614 8848 JJ aa 17238 17351 8735 8848
|
|
|
|
JJ bb 16512 17351 6601 7440 JJ bb 16997 17351 7086 7440
|
|
|
|
JJ bb 17015 17351 7104 7440 JJ bb 17094 17351 7183 7440}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.11.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 2 PRECEDING AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 44737 AA aa 44737 AA aa 44737 AA aa 44737 AA bb 44737
|
|
|
|
AA bb 44737 AA bb 44737 AA bb 44737 BB aa 44737 BB aa 44737
|
|
|
|
BB aa 44737 BB aa 44737 BB aa 44737 BB aa 44737 BB bb 44737
|
|
|
|
BB bb 44737 BB bb 44737 BB bb 44737 BB bb 44737 BB bb 44737
|
|
|
|
CC aa 44737 CC aa 44737 CC aa 44737 CC aa 44737 CC bb 44737
|
|
|
|
CC bb 44737 DD aa 40052 DD aa 40052 DD aa 40052 DD bb 40052
|
|
|
|
DD bb 40052 DD bb 40052 DD bb 40052 EE aa 32712 EE aa 32712
|
|
|
|
EE bb 32712 EE bb 32712 EE bb 32712 FF aa 29590 FF aa 29590
|
|
|
|
FF aa 29590 FF aa 29590 FF bb 29590 FF bb 29590 FF bb 29590
|
|
|
|
FF bb 29590 FF bb 29590 FF bb 29590 GG aa 25558 GG aa 25558
|
|
|
|
GG aa 25558 GG aa 25558 GG bb 25558 GG bb 25558 GG bb 25558
|
|
|
|
GG bb 25558 HH aa 23019 HH aa 23019 HH aa 23019 HH bb 23019
|
|
|
|
HH bb 23019 HH bb 23019 HH bb 23019 HH bb 23019 HH bb 23019
|
|
|
|
II aa 17351 II aa 17351 II bb 17351 II bb 17351 II bb 17351
|
|
|
|
II bb 17351 II bb 17351 JJ aa 12883 JJ aa 12883 JJ aa 12883
|
|
|
|
JJ aa 12883 JJ bb 12883 JJ bb 12883 JJ bb 12883 JJ bb 12883}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.11.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 44737 AA aa 44737 AA aa 44737 AA aa 44737 AA bb 44737
|
|
|
|
AA bb 44737 AA bb 44737 AA bb 44737 BB aa 44737 BB aa 44737
|
|
|
|
BB aa 44737 BB aa 44737 BB aa 44737 BB aa 44737 BB bb 42430
|
|
|
|
BB bb 42430 BB bb 42430 BB bb 42430 BB bb 42430 BB bb 42430
|
|
|
|
CC aa 40052 CC aa 40052 CC aa 40052 CC aa 40052 CC bb 37179
|
|
|
|
CC bb 37179 DD aa 32712 DD aa 32712 DD aa 32712 DD bb 30758
|
|
|
|
DD bb 30758 DD bb 30758 DD bb 30758 EE aa 29590 EE aa 29590
|
|
|
|
EE bb 28265 EE bb 28265 EE bb 28265 FF aa 25558 FF aa 25558
|
|
|
|
FF aa 25558 FF aa 25558 FF bb 24668 FF bb 24668 FF bb 24668
|
|
|
|
FF bb 24668 FF bb 24668 FF bb 24668 GG aa 23019 GG aa 23019
|
|
|
|
GG aa 23019 GG aa 23019 GG bb 20856 GG bb 20856 GG bb 20856
|
|
|
|
GG bb 20856 HH aa 17351 HH aa 17351 HH aa 17351 HH bb 15754
|
|
|
|
HH bb 15754 HH bb 15754 HH bb 15754 HH bb 15754 HH bb 15754
|
|
|
|
II aa 12883 II aa 12883 II bb 10634 II bb 10634 II bb 10634
|
|
|
|
II bb 10634 II bb 10634 JJ aa 7440 JJ aa 7440 JJ aa 7440
|
|
|
|
JJ aa 7440 JJ bb 6390 JJ bb 6390 JJ bb 6390 JJ bb 6390}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.11.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN 2 PRECEDING AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.11.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 979 AA aa 979 AA aa 979 AA aa 979 AA bb 979 AA bb 979
|
|
|
|
AA bb 979 AA bb 979 BB aa 979 BB aa 979 BB aa 979 BB aa 979
|
|
|
|
BB aa 979 BB aa 979 BB bb 979 BB bb 979 BB bb 979 BB bb 979
|
|
|
|
BB bb 979 BB bb 979 CC aa 979 CC aa 979 CC aa 979 CC aa 979
|
|
|
|
CC bb 979 CC bb 979 DD aa 979 DD aa 979 DD aa 979 DD bb 979
|
|
|
|
DD bb 979 DD bb 979 DD bb 979 EE aa 979 EE aa 979 EE bb 979
|
|
|
|
EE bb 979 EE bb 979 FF aa 979 FF aa 979 FF aa 979 FF aa 979
|
|
|
|
FF bb 979 FF bb 979 FF bb 979 FF bb 979 FF bb 979 FF bb 979
|
|
|
|
GG aa 979 GG aa 979 GG aa 979 GG aa 979 GG bb 979 GG bb 979
|
|
|
|
GG bb 979 GG bb 979 HH aa 979 HH aa 979 HH aa 979 HH bb 979
|
|
|
|
HH bb 979 HH bb 979 HH bb 979 HH bb 979 HH bb 979 II aa 979
|
|
|
|
II aa 979 II bb 963 II bb 963 II bb 963 II bb 963 II bb 963
|
|
|
|
JJ aa 899 JJ aa 899 JJ aa 899 JJ aa 899 JJ bb 899 JJ bb 899
|
|
|
|
JJ bb 899 JJ bb 899}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.11.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 102 AA aa 102 AA aa 102 AA aa 102 AA bb 102 AA bb 102
|
|
|
|
AA bb 102 AA bb 102 BB aa 102 BB aa 102 BB aa 102 BB aa 102
|
|
|
|
BB aa 102 BB aa 102 BB bb 102 BB bb 102 BB bb 102 BB bb 102
|
|
|
|
BB bb 102 BB bb 102 CC aa 102 CC aa 102 CC aa 102 CC aa 102
|
|
|
|
CC bb 102 CC bb 102 DD aa 102 DD aa 102 DD aa 102 DD bb 102
|
|
|
|
DD bb 102 DD bb 102 DD bb 102 EE aa 102 EE aa 102 EE bb 102
|
|
|
|
EE bb 102 EE bb 102 FF aa 102 FF aa 102 FF aa 102 FF aa 102
|
|
|
|
FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102
|
|
|
|
GG aa 102 GG aa 102 GG aa 102 GG aa 102 GG bb 102 GG bb 102
|
|
|
|
GG bb 102 GG bb 102 HH aa 113 HH aa 113 HH aa 113 HH bb 113
|
|
|
|
HH bb 113 HH bb 113 HH bb 113 HH bb 113 HH bb 113 II aa 113
|
|
|
|
II aa 113 II bb 113 II bb 113 II bb 113 II bb 113 II bb 113
|
|
|
|
JJ aa 113 JJ aa 113 JJ aa 113 JJ aa 113 JJ bb 113 JJ bb 113
|
|
|
|
JJ bb 113 JJ bb 113}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.11.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 2 PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 43803 AA aa 43826 AA aa 44498 AA aa 44514 AA bb 43867
|
|
|
|
AA bb 44110 AA bb 44165 AA bb 44428 BB aa 43975 BB aa 44077
|
|
|
|
BB aa 44325 BB aa 44338 BB aa 44344 BB aa 44490 BB bb 43897
|
|
|
|
BB bb 43945 BB bb 43951 BB bb 44026 BB bb 44032 BB bb 44104
|
|
|
|
CC aa 43978 CC aa 44130 CC aa 44307 CC aa 44579 CC bb 43915
|
|
|
|
CC bb 44391 DD aa 39207 DD aa 39796 DD aa 39828 DD bb 39093
|
|
|
|
DD bb 39258 DD bb 39336 DD bb 39814 EE aa 31935 EE aa 32599
|
|
|
|
EE bb 31944 EE bb 32083 EE bb 32460 FF aa 28920 FF aa 28923
|
|
|
|
FF aa 28972 FF aa 29382 FF bb 28652 FF bb 28720 FF bb 28864
|
|
|
|
FF bb 29016 FF bb 29295 FF bb 29488 GG aa 24924 GG aa 25078
|
|
|
|
GG aa 25223 GG aa 25410 GG bb 24620 GG bb 24629 GG bb 24714
|
|
|
|
GG bb 25398 HH aa 22040 HH aa 22229 HH aa 22539 HH bb 22056
|
|
|
|
HH bb 22289 HH bb 22336 HH bb 22664 HH bb 22689 HH bb 22886
|
|
|
|
II aa 16699 II aa 16953 II bb 16546 II bb 16680 II bb 16908
|
|
|
|
II bb 16930 II bb 17101 JJ aa 11984 JJ aa 12115 JJ aa 12649
|
|
|
|
JJ aa 12770 JJ bb 12044 JJ bb 12529 JJ bb 12547 JJ bb 12626}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.11.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 43803 AA aa 43826 AA aa 44498 AA aa 44514 AA bb 43867
|
|
|
|
AA bb 44110 AA bb 44165 AA bb 44428 BB aa 43975 BB aa 44077
|
|
|
|
BB aa 44325 BB aa 44338 BB aa 44344 BB aa 44490 BB bb 41590
|
|
|
|
BB bb 41638 BB bb 41644 BB bb 41719 BB bb 41725 BB bb 41797
|
|
|
|
CC aa 39293 CC aa 39445 CC aa 39622 CC aa 39894 CC bb 36357
|
|
|
|
CC bb 36833 DD aa 31867 DD aa 32456 DD aa 32488 DD bb 29799
|
|
|
|
DD bb 29964 DD bb 30042 DD bb 30520 EE aa 28813 EE aa 29477
|
|
|
|
EE bb 27497 EE bb 27636 EE bb 28013 FF aa 24888 FF aa 24891
|
|
|
|
FF aa 24940 FF aa 25350 FF bb 23730 FF bb 23798 FF bb 23942
|
|
|
|
FF bb 24094 FF bb 24373 FF bb 24566 GG aa 22385 GG aa 22539
|
|
|
|
GG aa 22684 GG aa 22871 GG bb 19918 GG bb 19927 GG bb 20012
|
|
|
|
GG bb 20696 HH aa 16372 HH aa 16561 HH aa 16871 HH bb 14791
|
|
|
|
HH bb 15024 HH bb 15071 HH bb 15399 HH bb 15424 HH bb 15621
|
|
|
|
II aa 12231 II aa 12485 II bb 9829 II bb 9963 II bb 10191
|
|
|
|
II bb 10213 II bb 10384 JJ aa 6541 JJ aa 6672 JJ aa 7206
|
|
|
|
JJ aa 7327 JJ bb 5551 JJ bb 6036 JJ bb 6054 JJ bb 6133}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.11.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 2 PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 2 PRECEDING AND UNBOUNDED FOLLOWING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 2 PRECEDING AND UNBOUNDED FOLLOWING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa 43803 44737 43803 44737 AA aa 43826 44737 43826 44737
|
|
|
|
AA aa 44498 44737 44498 44737 AA aa 44514 44737 44514 44737
|
|
|
|
AA bb 43867 44737 43867 44737 AA bb 44110 44737 44110 44737
|
|
|
|
AA bb 44165 44737 44165 44737 AA bb 44428 44737 44428 44737
|
|
|
|
BB aa 43975 44737 43975 44737 BB aa 44077 44737 44077 44737
|
|
|
|
BB aa 44325 44737 44325 44737 BB aa 44338 44737 44338 44737
|
|
|
|
BB aa 44344 44737 44344 44737 BB aa 44490 44737 44490 44737
|
|
|
|
BB bb 43897 44737 41590 42430 BB bb 43945 44737 41638 42430
|
|
|
|
BB bb 43951 44737 41644 42430 BB bb 44026 44737 41719 42430
|
|
|
|
BB bb 44032 44737 41725 42430 BB bb 44104 44737 41797 42430
|
|
|
|
CC aa 43978 44737 39293 40052 CC aa 44130 44737 39445 40052
|
|
|
|
CC aa 44307 44737 39622 40052 CC aa 44579 44737 39894 40052
|
|
|
|
CC bb 43915 44737 36357 37179 CC bb 44391 44737 36833 37179
|
|
|
|
DD aa 39207 40052 31867 32712 DD aa 39796 40052 32456 32712
|
|
|
|
DD aa 39828 40052 32488 32712 DD bb 39093 40052 29799 30758
|
|
|
|
DD bb 39258 40052 29964 30758 DD bb 39336 40052 30042 30758
|
|
|
|
DD bb 39814 40052 30520 30758 EE aa 31935 32712 28813 29590
|
|
|
|
EE aa 32599 32712 29477 29590 EE bb 31944 32712 27497 28265
|
|
|
|
EE bb 32083 32712 27636 28265 EE bb 32460 32712 28013 28265
|
|
|
|
FF aa 28920 29590 24888 25558 FF aa 28923 29590 24891 25558
|
|
|
|
FF aa 28972 29590 24940 25558 FF aa 29382 29590 25350 25558
|
|
|
|
FF bb 28652 29590 23730 24668 FF bb 28720 29590 23798 24668
|
|
|
|
FF bb 28864 29590 23942 24668 FF bb 29016 29590 24094 24668
|
|
|
|
FF bb 29295 29590 24373 24668 FF bb 29488 29590 24566 24668
|
|
|
|
GG aa 24924 25558 22385 23019 GG aa 25078 25558 22539 23019
|
|
|
|
GG aa 25223 25558 22684 23019 GG aa 25410 25558 22871 23019
|
|
|
|
GG bb 24620 25558 19918 20856 GG bb 24629 25558 19927 20856
|
|
|
|
GG bb 24714 25558 20012 20856 GG bb 25398 25558 20696 20856
|
|
|
|
HH aa 22040 23019 16372 17351 HH aa 22229 23019 16561 17351
|
|
|
|
HH aa 22539 23019 16871 17351 HH bb 22056 23019 14791 15754
|
|
|
|
HH bb 22289 23019 15024 15754 HH bb 22336 23019 15071 15754
|
|
|
|
HH bb 22664 23019 15399 15754 HH bb 22689 23019 15424 15754
|
|
|
|
HH bb 22886 23019 15621 15754 II aa 16699 17351 12231 12883
|
|
|
|
II aa 16953 17351 12485 12883 II bb 16546 17351 9829 10634
|
|
|
|
II bb 16680 17351 9963 10634 II bb 16908 17351 10191 10634
|
|
|
|
II bb 16930 17351 10213 10634 II bb 17101 17351 10384 10634
|
|
|
|
JJ aa 11984 12883 6541 7440 JJ aa 12115 12883 6672 7440
|
|
|
|
JJ aa 12649 12883 7206 7440 JJ aa 12770 12883 7327 7440
|
|
|
|
JJ bb 12044 12883 5551 6390 JJ bb 12529 12883 6036 6390
|
|
|
|
JJ bb 12547 12883 6054 6390 JJ bb 12626 12883 6133 6390}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.12.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 4685 AA aa 4685 AA aa 4685 AA aa 4685 AA bb 4685 AA bb 4685
|
|
|
|
AA bb 4685 AA bb 4685 BB aa 7340 BB aa 7340 BB aa 7340 BB aa 7340
|
|
|
|
BB aa 7340 BB aa 7340 BB bb 7340 BB bb 7340 BB bb 7340 BB bb 7340
|
|
|
|
BB bb 7340 BB bb 7340 CC aa 3122 CC aa 3122 CC aa 3122 CC aa 3122
|
|
|
|
CC bb 3122 CC bb 3122 DD aa 4032 DD aa 4032 DD aa 4032 DD bb 4032
|
|
|
|
DD bb 4032 DD bb 4032 DD bb 4032 EE aa 2539 EE aa 2539 EE bb 2539
|
|
|
|
EE bb 2539 EE bb 2539 FF aa 5668 FF aa 5668 FF aa 5668 FF aa 5668
|
|
|
|
FF bb 5668 FF bb 5668 FF bb 5668 FF bb 5668 FF bb 5668 FF bb 5668
|
|
|
|
GG aa 4468 GG aa 4468 GG aa 4468 GG aa 4468 GG bb 4468 GG bb 4468
|
|
|
|
GG bb 4468 GG bb 4468 HH aa 5443 HH aa 5443 HH aa 5443 HH bb 5443
|
|
|
|
HH bb 5443 HH bb 5443 HH bb 5443 HH bb 5443 HH bb 5443 II aa 3640
|
|
|
|
II aa 3640 II bb 3640 II bb 3640 II bb 3640 II bb 3640 II bb 3640
|
|
|
|
JJ aa 3800 JJ aa 3800 JJ aa 3800 JJ aa 3800 JJ bb 3800 JJ bb 3800
|
|
|
|
JJ bb 3800 JJ bb 3800}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.12.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 2307 AA aa 2307 AA aa 2307 AA aa 2307 AA bb 2378 AA bb 2378
|
|
|
|
AA bb 2378 AA bb 2378 BB aa 2873 BB aa 2873 BB aa 2873 BB aa 2873
|
|
|
|
BB aa 2873 BB aa 2873 BB bb 4467 BB bb 4467 BB bb 4467 BB bb 4467
|
|
|
|
BB bb 4467 BB bb 4467 CC aa 1954 CC aa 1954 CC aa 1954 CC aa 1954
|
|
|
|
CC bb 1168 CC bb 1168 DD aa 1325 DD aa 1325 DD aa 1325 DD bb 2707
|
|
|
|
DD bb 2707 DD bb 2707 DD bb 2707 EE aa 890 EE aa 890 EE bb 1649
|
|
|
|
EE bb 1649 EE bb 1649 FF aa 2163 FF aa 2163 FF aa 2163 FF aa 2163
|
|
|
|
FF bb 3505 FF bb 3505 FF bb 3505 FF bb 3505 FF bb 3505 FF bb 3505
|
|
|
|
GG aa 1597 GG aa 1597 GG aa 1597 GG aa 1597 GG bb 2871 GG bb 2871
|
|
|
|
GG bb 2871 GG bb 2871 HH aa 2249 HH aa 2249 HH aa 2249 HH bb 3194
|
|
|
|
HH bb 3194 HH bb 3194 HH bb 3194 HH bb 3194 HH bb 3194 II aa 1050
|
|
|
|
II aa 1050 II bb 2590 II bb 2590 II bb 2590 II bb 2590 II bb 2590
|
|
|
|
JJ aa 2014 JJ aa 2014 JJ aa 2014 JJ aa 2014 JJ bb 1786 JJ bb 1786
|
|
|
|
JJ bb 1786 JJ bb 1786}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.12.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.12.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 934 AA aa 934 AA aa 934 AA aa 934 AA bb 870 AA bb 870
|
|
|
|
AA bb 870 AA bb 870 BB aa 762 BB aa 762 BB aa 762 BB aa 762
|
|
|
|
BB aa 762 BB aa 762 BB bb 840 BB bb 840 BB bb 840 BB bb 840
|
|
|
|
BB bb 840 BB bb 840 CC aa 759 CC aa 759 CC aa 759 CC aa 759
|
|
|
|
CC bb 822 CC bb 822 DD aa 845 DD aa 845 DD aa 845 DD bb 959
|
|
|
|
DD bb 959 DD bb 959 DD bb 959 EE aa 777 EE aa 777 EE bb 768
|
|
|
|
EE bb 768 EE bb 768 FF aa 670 FF aa 670 FF aa 670 FF aa 670
|
|
|
|
FF bb 938 FF bb 938 FF bb 938 FF bb 938 FF bb 938 FF bb 938
|
|
|
|
GG aa 634 GG aa 634 GG aa 634 GG aa 634 GG bb 938 GG bb 938
|
|
|
|
GG bb 938 GG bb 938 HH aa 979 HH aa 979 HH aa 979 HH bb 963
|
|
|
|
HH bb 963 HH bb 963 HH bb 963 HH bb 963 HH bb 963 II aa 652
|
|
|
|
II aa 652 II bb 805 II bb 805 II bb 805 II bb 805 II bb 805
|
|
|
|
JJ aa 899 JJ aa 899 JJ aa 899 JJ aa 899 JJ bb 839 JJ bb 839
|
|
|
|
JJ bb 839 JJ bb 839}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.12.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 223 AA aa 223 AA aa 223 AA aa 223 AA bb 309 AA bb 309
|
|
|
|
AA bb 309 AA bb 309 BB aa 247 BB aa 247 BB aa 247 BB aa 247
|
|
|
|
BB aa 247 BB aa 247 BB bb 633 BB bb 633 BB bb 633 BB bb 633
|
|
|
|
BB bb 633 BB bb 633 CC aa 158 CC aa 158 CC aa 158 CC aa 158
|
|
|
|
CC bb 346 CC bb 346 DD aa 224 DD aa 224 DD aa 224 DD bb 238
|
|
|
|
DD bb 238 DD bb 238 DD bb 238 EE aa 113 EE aa 113 EE bb 252
|
|
|
|
EE bb 252 EE bb 252 FF aa 208 FF aa 208 FF aa 208 FF aa 208
|
|
|
|
FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102
|
|
|
|
GG aa 148 GG aa 148 GG aa 148 GG aa 148 GG bb 160 GG bb 160
|
|
|
|
GG bb 160 GG bb 160 HH aa 480 HH aa 480 HH aa 480 HH bb 133
|
|
|
|
HH bb 133 HH bb 133 HH bb 133 HH bb 133 HH bb 133 II aa 398
|
|
|
|
II aa 398 II bb 250 II bb 250 II bb 250 II bb 250 II bb 250
|
|
|
|
JJ aa 113 JJ aa 113 JJ aa 113 JJ aa 113 JJ bb 257 JJ bb 257
|
|
|
|
JJ bb 257 JJ bb 257}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.12.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND 0 FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 3751 AA aa 3774 AA aa 4446 AA aa 4462 AA bb 3815 AA bb 4058
|
|
|
|
AA bb 4113 AA bb 4376 BB aa 6578 BB aa 6680 BB aa 6928 BB aa 6941
|
|
|
|
BB aa 6947 BB aa 7093 BB bb 6500 BB bb 6548 BB bb 6554 BB bb 6629
|
|
|
|
BB bb 6635 BB bb 6707 CC aa 2363 CC aa 2515 CC aa 2692 CC aa 2964
|
|
|
|
CC bb 2300 CC bb 2776 DD aa 3187 DD aa 3776 DD aa 3808 DD bb 3073
|
|
|
|
DD bb 3238 DD bb 3316 DD bb 3794 EE aa 1762 EE aa 2426 EE bb 1771
|
|
|
|
EE bb 1910 EE bb 2287 FF aa 4998 FF aa 5001 FF aa 5050 FF aa 5460
|
|
|
|
FF bb 4730 FF bb 4798 FF bb 4942 FF bb 5094 FF bb 5373 FF bb 5566
|
|
|
|
GG aa 3834 GG aa 3988 GG aa 4133 GG aa 4320 GG bb 3530 GG bb 3539
|
|
|
|
GG bb 3624 GG bb 4308 HH aa 4464 HH aa 4653 HH aa 4963 HH bb 4480
|
|
|
|
HH bb 4713 HH bb 4760 HH bb 5088 HH bb 5113 HH bb 5310 II aa 2988
|
|
|
|
II aa 3242 II bb 2835 II bb 2969 II bb 3197 II bb 3219 II bb 3390
|
|
|
|
JJ aa 2901 JJ aa 3032 JJ aa 3566 JJ aa 3687 JJ bb 2961 JJ bb 3446
|
|
|
|
JJ bb 3464 JJ bb 3543}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.12.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 0 FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1373 AA aa 1396 AA aa 2068 AA aa 2084 AA bb 1508 AA bb 1751
|
|
|
|
AA bb 1806 AA bb 2069 BB aa 2111 BB aa 2213 BB aa 2461 BB aa 2474
|
|
|
|
BB aa 2480 BB aa 2626 BB bb 3627 BB bb 3675 BB bb 3681 BB bb 3756
|
|
|
|
BB bb 3762 BB bb 3834 CC aa 1195 CC aa 1347 CC aa 1524 CC aa 1796
|
|
|
|
CC bb 346 CC bb 822 DD aa 480 DD aa 1069 DD aa 1101 DD bb 1748
|
|
|
|
DD bb 1913 DD bb 1991 DD bb 2469 EE aa 113 EE aa 777 EE bb 881
|
|
|
|
EE bb 1020 EE bb 1397 FF aa 1493 FF aa 1496 FF aa 1545 FF aa 1955
|
|
|
|
FF bb 2567 FF bb 2635 FF bb 2779 FF bb 2931 FF bb 3210 FF bb 3403
|
|
|
|
GG aa 963 GG aa 1117 GG aa 1262 GG aa 1449 GG bb 1933 GG bb 1942
|
|
|
|
GG bb 2027 GG bb 2711 HH aa 1270 HH aa 1459 HH aa 1769 HH bb 2231
|
|
|
|
HH bb 2464 HH bb 2511 HH bb 2839 HH bb 2864 HH bb 3061 II aa 398
|
|
|
|
II aa 652 II bb 1785 II bb 1919 II bb 2147 II bb 2169 II bb 2340
|
|
|
|
JJ aa 1115 JJ aa 1246 JJ aa 1780 JJ aa 1901 JJ bb 947 JJ bb 1432
|
|
|
|
JJ bb 1450 JJ bb 1529}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.12.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND 0 FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND 0 FOLLOWING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 0 FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 0 FOLLOWING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa 3751 4685 1373 2307 AA aa 3774 4685 1396 2307
|
|
|
|
AA aa 4446 4685 2068 2307 AA aa 4462 4685 2084 2307
|
|
|
|
AA bb 3815 4685 1508 2378 AA bb 4058 4685 1751 2378
|
|
|
|
AA bb 4113 4685 1806 2378 AA bb 4376 4685 2069 2378
|
|
|
|
BB aa 6578 7340 2111 2873 BB aa 6680 7340 2213 2873
|
|
|
|
BB aa 6928 7340 2461 2873 BB aa 6941 7340 2474 2873
|
|
|
|
BB aa 6947 7340 2480 2873 BB aa 7093 7340 2626 2873
|
|
|
|
BB bb 6500 7340 3627 4467 BB bb 6548 7340 3675 4467
|
|
|
|
BB bb 6554 7340 3681 4467 BB bb 6629 7340 3756 4467
|
|
|
|
BB bb 6635 7340 3762 4467 BB bb 6707 7340 3834 4467
|
|
|
|
CC aa 2363 3122 1195 1954 CC aa 2515 3122 1347 1954
|
|
|
|
CC aa 2692 3122 1524 1954 CC aa 2964 3122 1796 1954
|
|
|
|
CC bb 2300 3122 346 1168 CC bb 2776 3122 822 1168
|
|
|
|
DD aa 3187 4032 480 1325 DD aa 3776 4032 1069 1325
|
|
|
|
DD aa 3808 4032 1101 1325 DD bb 3073 4032 1748 2707
|
|
|
|
DD bb 3238 4032 1913 2707 DD bb 3316 4032 1991 2707
|
|
|
|
DD bb 3794 4032 2469 2707 EE aa 1762 2539 113 890
|
|
|
|
EE aa 2426 2539 777 890 EE bb 1771 2539 881 1649
|
|
|
|
EE bb 1910 2539 1020 1649 EE bb 2287 2539 1397 1649
|
|
|
|
FF aa 4998 5668 1493 2163 FF aa 5001 5668 1496 2163
|
|
|
|
FF aa 5050 5668 1545 2163 FF aa 5460 5668 1955 2163
|
|
|
|
FF bb 4730 5668 2567 3505 FF bb 4798 5668 2635 3505
|
|
|
|
FF bb 4942 5668 2779 3505 FF bb 5094 5668 2931 3505
|
|
|
|
FF bb 5373 5668 3210 3505 FF bb 5566 5668 3403 3505
|
|
|
|
GG aa 3834 4468 963 1597 GG aa 3988 4468 1117 1597
|
|
|
|
GG aa 4133 4468 1262 1597 GG aa 4320 4468 1449 1597
|
|
|
|
GG bb 3530 4468 1933 2871 GG bb 3539 4468 1942 2871
|
|
|
|
GG bb 3624 4468 2027 2871 GG bb 4308 4468 2711 2871
|
|
|
|
HH aa 4464 5443 1270 2249 HH aa 4653 5443 1459 2249
|
|
|
|
HH aa 4963 5443 1769 2249 HH bb 4480 5443 2231 3194
|
|
|
|
HH bb 4713 5443 2464 3194 HH bb 4760 5443 2511 3194
|
|
|
|
HH bb 5088 5443 2839 3194 HH bb 5113 5443 2864 3194
|
|
|
|
HH bb 5310 5443 3061 3194 II aa 2988 3640 398 1050
|
|
|
|
II aa 3242 3640 652 1050 II bb 2835 3640 1785 2590
|
|
|
|
II bb 2969 3640 1919 2590 II bb 3197 3640 2147 2590
|
|
|
|
II bb 3219 3640 2169 2590 II bb 3390 3640 2340 2590
|
|
|
|
JJ aa 2901 3800 1115 2014 JJ aa 3032 3800 1246 2014
|
|
|
|
JJ aa 3566 3800 1780 2014 JJ aa 3687 3800 1901 2014
|
|
|
|
JJ bb 2961 3800 947 1786 JJ bb 3446 3800 1432 1786
|
|
|
|
JJ bb 3464 3800 1450 1786 JJ bb 3543 3800 1529 1786}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.13.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND 1 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 12025 AA aa 12025 AA aa 12025 AA aa 12025 AA bb 12025
|
|
|
|
AA bb 12025 AA bb 12025 AA bb 12025 BB aa 10462 BB aa 10462
|
|
|
|
BB aa 10462 BB aa 10462 BB aa 10462 BB aa 10462 BB bb 10462
|
|
|
|
BB bb 10462 BB bb 10462 BB bb 10462 BB bb 10462 BB bb 10462
|
|
|
|
CC aa 7154 CC aa 7154 CC aa 7154 CC aa 7154 CC bb 7154 CC bb 7154
|
|
|
|
DD aa 6571 DD aa 6571 DD aa 6571 DD bb 6571 DD bb 6571 DD bb 6571
|
|
|
|
DD bb 6571 EE aa 8207 EE aa 8207 EE bb 8207 EE bb 8207 EE bb 8207
|
|
|
|
FF aa 10136 FF aa 10136 FF aa 10136 FF aa 10136 FF bb 10136
|
|
|
|
FF bb 10136 FF bb 10136 FF bb 10136 FF bb 10136 FF bb 10136
|
|
|
|
GG aa 9911 GG aa 9911 GG aa 9911 GG aa 9911 GG bb 9911 GG bb 9911
|
|
|
|
GG bb 9911 GG bb 9911 HH aa 9083 HH aa 9083 HH aa 9083 HH bb 9083
|
|
|
|
HH bb 9083 HH bb 9083 HH bb 9083 HH bb 9083 HH bb 9083 II aa 7440
|
|
|
|
II aa 7440 II bb 7440 II bb 7440 II bb 7440 II bb 7440 II bb 7440
|
|
|
|
JJ aa 3800 JJ aa 3800 JJ aa 3800 JJ aa 3800 JJ bb 3800 JJ bb 3800
|
|
|
|
JJ bb 3800 JJ bb 3800}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.13.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 1 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 4685 AA aa 4685 AA aa 4685 AA aa 4685 AA bb 5251 AA bb 5251
|
|
|
|
AA bb 5251 AA bb 5251 BB aa 7340 BB aa 7340 BB aa 7340 BB aa 7340
|
|
|
|
BB aa 7340 BB aa 7340 BB bb 6421 BB bb 6421 BB bb 6421 BB bb 6421
|
|
|
|
BB bb 6421 BB bb 6421 CC aa 3122 CC aa 3122 CC aa 3122 CC aa 3122
|
|
|
|
CC bb 2493 CC bb 2493 DD aa 4032 DD aa 4032 DD aa 4032 DD bb 3597
|
|
|
|
DD bb 3597 DD bb 3597 DD bb 3597 EE aa 2539 EE aa 2539 EE bb 3812
|
|
|
|
EE bb 3812 EE bb 3812 FF aa 5668 FF aa 5668 FF aa 5668 FF aa 5668
|
|
|
|
FF bb 5102 FF bb 5102 FF bb 5102 FF bb 5102 FF bb 5102 FF bb 5102
|
|
|
|
GG aa 4468 GG aa 4468 GG aa 4468 GG aa 4468 GG bb 5120 GG bb 5120
|
|
|
|
GG bb 5120 GG bb 5120 HH aa 5443 HH aa 5443 HH aa 5443 HH bb 4244
|
|
|
|
HH bb 4244 HH bb 4244 HH bb 4244 HH bb 4244 HH bb 4244 II aa 3640
|
|
|
|
II aa 3640 II bb 4604 II bb 4604 II bb 4604 II bb 4604 II bb 4604
|
|
|
|
JJ aa 3800 JJ aa 3800 JJ aa 3800 JJ aa 3800 JJ bb 1786 JJ bb 1786
|
|
|
|
JJ bb 1786 JJ bb 1786}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.13.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND 1 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.13.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 1 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 934 AA aa 934 AA aa 934 AA aa 934 AA bb 870 AA bb 870
|
|
|
|
AA bb 870 AA bb 870 BB aa 840 BB aa 840 BB aa 840 BB aa 840
|
|
|
|
BB aa 840 BB aa 840 BB bb 840 BB bb 840 BB bb 840 BB bb 840
|
|
|
|
BB bb 840 BB bb 840 CC aa 822 CC aa 822 CC aa 822 CC aa 822
|
|
|
|
CC bb 845 CC bb 845 DD aa 959 DD aa 959 DD aa 959 DD bb 959
|
|
|
|
DD bb 959 DD bb 959 DD bb 959 EE aa 777 EE aa 777 EE bb 768
|
|
|
|
EE bb 768 EE bb 768 FF aa 938 FF aa 938 FF aa 938 FF aa 938
|
|
|
|
FF bb 938 FF bb 938 FF bb 938 FF bb 938 FF bb 938 FF bb 938
|
|
|
|
GG aa 938 GG aa 938 GG aa 938 GG aa 938 GG bb 979 GG bb 979
|
|
|
|
GG bb 979 GG bb 979 HH aa 979 HH aa 979 HH aa 979 HH bb 963
|
|
|
|
HH bb 963 HH bb 963 HH bb 963 HH bb 963 HH bb 963 II aa 805
|
|
|
|
II aa 805 II bb 899 II bb 899 II bb 899 II bb 899 II bb 899
|
|
|
|
JJ aa 899 JJ aa 899 JJ aa 899 JJ aa 899 JJ bb 839 JJ bb 839
|
|
|
|
JJ bb 839 JJ bb 839}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.13.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 1 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 223 AA aa 223 AA aa 223 AA aa 223 AA bb 247 AA bb 247
|
|
|
|
AA bb 247 AA bb 247 BB aa 247 BB aa 247 BB aa 247 BB aa 247
|
|
|
|
BB aa 247 BB aa 247 BB bb 158 BB bb 158 BB bb 158 BB bb 158
|
|
|
|
BB bb 158 BB bb 158 CC aa 158 CC aa 158 CC aa 158 CC aa 158
|
|
|
|
CC bb 224 CC bb 224 DD aa 224 DD aa 224 DD aa 224 DD bb 113
|
|
|
|
DD bb 113 DD bb 113 DD bb 113 EE aa 113 EE aa 113 EE bb 208
|
|
|
|
EE bb 208 EE bb 208 FF aa 102 FF aa 102 FF aa 102 FF aa 102
|
|
|
|
FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102
|
|
|
|
GG aa 148 GG aa 148 GG aa 148 GG aa 148 GG bb 160 GG bb 160
|
|
|
|
GG bb 160 GG bb 160 HH aa 133 HH aa 133 HH aa 133 HH bb 133
|
|
|
|
HH bb 133 HH bb 133 HH bb 133 HH bb 133 HH bb 133 II aa 250
|
|
|
|
II aa 250 II bb 113 II bb 113 II bb 113 II bb 113 II bb 113
|
|
|
|
JJ aa 113 JJ aa 113 JJ aa 113 JJ aa 113 JJ bb 257 JJ bb 257
|
|
|
|
JJ bb 257 JJ bb 257}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.13.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND 1 FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 11091 AA aa 11114 AA aa 11786 AA aa 11802 AA bb 11155
|
|
|
|
AA bb 11398 AA bb 11453 AA bb 11716 BB aa 9700 BB aa 9802
|
|
|
|
BB aa 10050 BB aa 10063 BB aa 10069 BB aa 10215 BB bb 9622
|
|
|
|
BB bb 9670 BB bb 9676 BB bb 9751 BB bb 9757 BB bb 9829 CC aa 6395
|
|
|
|
CC aa 6547 CC aa 6724 CC aa 6996 CC bb 6332 CC bb 6808 DD aa 5726
|
|
|
|
DD aa 6315 DD aa 6347 DD bb 5612 DD bb 5777 DD bb 5855 DD bb 6333
|
|
|
|
EE aa 7430 EE aa 8094 EE bb 7439 EE bb 7578 EE bb 7955 FF aa 9466
|
|
|
|
FF aa 9469 FF aa 9518 FF aa 9928 FF bb 9198 FF bb 9266 FF bb 9410
|
|
|
|
FF bb 9562 FF bb 9841 FF bb 10034 GG aa 9277 GG aa 9431
|
|
|
|
GG aa 9576 GG aa 9763 GG bb 8973 GG bb 8982 GG bb 9067 GG bb 9751
|
|
|
|
HH aa 8104 HH aa 8293 HH aa 8603 HH bb 8120 HH bb 8353 HH bb 8400
|
|
|
|
HH bb 8728 HH bb 8753 HH bb 8950 II aa 6788 II aa 7042 II bb 6635
|
|
|
|
II bb 6769 II bb 6997 II bb 7019 II bb 7190 JJ aa 2901 JJ aa 3032
|
|
|
|
JJ aa 3566 JJ aa 3687 JJ bb 2961 JJ bb 3446 JJ bb 3464 JJ bb 3543}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.13.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 1 FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 3751 AA aa 3774 AA aa 4446 AA aa 4462 AA bb 4381 AA bb 4624
|
|
|
|
AA bb 4679 AA bb 4942 BB aa 6578 BB aa 6680 BB aa 6928 BB aa 6941
|
|
|
|
BB aa 6947 BB aa 7093 BB bb 5581 BB bb 5629 BB bb 5635 BB bb 5710
|
|
|
|
BB bb 5716 BB bb 5788 CC aa 2363 CC aa 2515 CC aa 2692 CC aa 2964
|
|
|
|
CC bb 1671 CC bb 2147 DD aa 3187 DD aa 3776 DD aa 3808 DD bb 2638
|
|
|
|
DD bb 2803 DD bb 2881 DD bb 3359 EE aa 1762 EE aa 2426 EE bb 3044
|
|
|
|
EE bb 3183 EE bb 3560 FF aa 4998 FF aa 5001 FF aa 5050 FF aa 5460
|
|
|
|
FF bb 4164 FF bb 4232 FF bb 4376 FF bb 4528 FF bb 4807 FF bb 5000
|
|
|
|
GG aa 3834 GG aa 3988 GG aa 4133 GG aa 4320 GG bb 4182 GG bb 4191
|
|
|
|
GG bb 4276 GG bb 4960 HH aa 4464 HH aa 4653 HH aa 4963 HH bb 3281
|
|
|
|
HH bb 3514 HH bb 3561 HH bb 3889 HH bb 3914 HH bb 4111 II aa 2988
|
|
|
|
II aa 3242 II bb 3799 II bb 3933 II bb 4161 II bb 4183 II bb 4354
|
|
|
|
JJ aa 2901 JJ aa 3032 JJ aa 3566 JJ aa 3687 JJ bb 947 JJ bb 1432
|
|
|
|
JJ bb 1450 JJ bb 1529}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.13.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND 1 FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND 1 FOLLOWING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 1 FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 1 FOLLOWING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa 11091 12025 3751 4685 AA aa 11114 12025 3774 4685
|
|
|
|
AA aa 11786 12025 4446 4685 AA aa 11802 12025 4462 4685
|
|
|
|
AA bb 11155 12025 4381 5251 AA bb 11398 12025 4624 5251
|
|
|
|
AA bb 11453 12025 4679 5251 AA bb 11716 12025 4942 5251
|
|
|
|
BB aa 9700 10462 6578 7340 BB aa 9802 10462 6680 7340
|
|
|
|
BB aa 10050 10462 6928 7340 BB aa 10063 10462 6941 7340
|
|
|
|
BB aa 10069 10462 6947 7340 BB aa 10215 10462 7093 7340
|
|
|
|
BB bb 9622 10462 5581 6421 BB bb 9670 10462 5629 6421
|
|
|
|
BB bb 9676 10462 5635 6421 BB bb 9751 10462 5710 6421
|
|
|
|
BB bb 9757 10462 5716 6421 BB bb 9829 10462 5788 6421
|
|
|
|
CC aa 6395 7154 2363 3122 CC aa 6547 7154 2515 3122
|
|
|
|
CC aa 6724 7154 2692 3122 CC aa 6996 7154 2964 3122
|
|
|
|
CC bb 6332 7154 1671 2493 CC bb 6808 7154 2147 2493
|
|
|
|
DD aa 5726 6571 3187 4032 DD aa 6315 6571 3776 4032
|
|
|
|
DD aa 6347 6571 3808 4032 DD bb 5612 6571 2638 3597
|
|
|
|
DD bb 5777 6571 2803 3597 DD bb 5855 6571 2881 3597
|
|
|
|
DD bb 6333 6571 3359 3597 EE aa 7430 8207 1762 2539
|
|
|
|
EE aa 8094 8207 2426 2539 EE bb 7439 8207 3044 3812
|
|
|
|
EE bb 7578 8207 3183 3812 EE bb 7955 8207 3560 3812
|
|
|
|
FF aa 9466 10136 4998 5668 FF aa 9469 10136 5001 5668
|
|
|
|
FF aa 9518 10136 5050 5668 FF aa 9928 10136 5460 5668
|
|
|
|
FF bb 9198 10136 4164 5102 FF bb 9266 10136 4232 5102
|
|
|
|
FF bb 9410 10136 4376 5102 FF bb 9562 10136 4528 5102
|
|
|
|
FF bb 9841 10136 4807 5102 FF bb 10034 10136 5000 5102
|
|
|
|
GG aa 9277 9911 3834 4468 GG aa 9431 9911 3988 4468
|
|
|
|
GG aa 9576 9911 4133 4468 GG aa 9763 9911 4320 4468
|
|
|
|
GG bb 8973 9911 4182 5120 GG bb 8982 9911 4191 5120
|
|
|
|
GG bb 9067 9911 4276 5120 GG bb 9751 9911 4960 5120
|
|
|
|
HH aa 8104 9083 4464 5443 HH aa 8293 9083 4653 5443
|
|
|
|
HH aa 8603 9083 4963 5443 HH bb 8120 9083 3281 4244
|
|
|
|
HH bb 8353 9083 3514 4244 HH bb 8400 9083 3561 4244
|
|
|
|
HH bb 8728 9083 3889 4244 HH bb 8753 9083 3914 4244
|
|
|
|
HH bb 8950 9083 4111 4244 II aa 6788 7440 2988 3640
|
|
|
|
II aa 7042 7440 3242 3640 II bb 6635 7440 3799 4604
|
|
|
|
II bb 6769 7440 3933 4604 II bb 6997 7440 4161 4604
|
|
|
|
II bb 7019 7440 4183 4604 II bb 7190 7440 4354 4604
|
|
|
|
JJ aa 2901 3800 2901 3800 JJ aa 3032 3800 3032 3800
|
|
|
|
JJ aa 3566 3800 3566 3800 JJ aa 3687 3800 3687 3800
|
|
|
|
JJ bb 2961 3800 947 1786 JJ bb 3446 3800 1432 1786
|
|
|
|
JJ bb 3464 3800 1450 1786 JJ bb 3543 3800 1529 1786}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.14.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND 100 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 44737 AA aa 44737 AA aa 44737 AA aa 44737 AA bb 44737
|
|
|
|
AA bb 44737 AA bb 44737 AA bb 44737 BB aa 40052 BB aa 40052
|
|
|
|
BB aa 40052 BB aa 40052 BB aa 40052 BB aa 40052 BB bb 40052
|
|
|
|
BB bb 40052 BB bb 40052 BB bb 40052 BB bb 40052 BB bb 40052
|
|
|
|
CC aa 32712 CC aa 32712 CC aa 32712 CC aa 32712 CC bb 32712
|
|
|
|
CC bb 32712 DD aa 29590 DD aa 29590 DD aa 29590 DD bb 29590
|
|
|
|
DD bb 29590 DD bb 29590 DD bb 29590 EE aa 25558 EE aa 25558
|
|
|
|
EE bb 25558 EE bb 25558 EE bb 25558 FF aa 23019 FF aa 23019
|
|
|
|
FF aa 23019 FF aa 23019 FF bb 23019 FF bb 23019 FF bb 23019
|
|
|
|
FF bb 23019 FF bb 23019 FF bb 23019 GG aa 17351 GG aa 17351
|
|
|
|
GG aa 17351 GG aa 17351 GG bb 17351 GG bb 17351 GG bb 17351
|
|
|
|
GG bb 17351 HH aa 12883 HH aa 12883 HH aa 12883 HH bb 12883
|
|
|
|
HH bb 12883 HH bb 12883 HH bb 12883 HH bb 12883 HH bb 12883
|
|
|
|
II aa 7440 II aa 7440 II bb 7440 II bb 7440 II bb 7440 II bb 7440
|
|
|
|
II bb 7440 JJ aa 3800 JJ aa 3800 JJ aa 3800 JJ aa 3800 JJ bb 3800
|
|
|
|
JJ bb 3800 JJ bb 3800 JJ bb 3800}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.14.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 100 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 44737 AA aa 44737 AA aa 44737 AA aa 44737 AA bb 42430
|
|
|
|
AA bb 42430 AA bb 42430 AA bb 42430 BB aa 40052 BB aa 40052
|
|
|
|
BB aa 40052 BB aa 40052 BB aa 40052 BB aa 40052 BB bb 37179
|
|
|
|
BB bb 37179 BB bb 37179 BB bb 37179 BB bb 37179 BB bb 37179
|
|
|
|
CC aa 32712 CC aa 32712 CC aa 32712 CC aa 32712 CC bb 30758
|
|
|
|
CC bb 30758 DD aa 29590 DD aa 29590 DD aa 29590 DD bb 28265
|
|
|
|
DD bb 28265 DD bb 28265 DD bb 28265 EE aa 25558 EE aa 25558
|
|
|
|
EE bb 24668 EE bb 24668 EE bb 24668 FF aa 23019 FF aa 23019
|
|
|
|
FF aa 23019 FF aa 23019 FF bb 20856 FF bb 20856 FF bb 20856
|
|
|
|
FF bb 20856 FF bb 20856 FF bb 20856 GG aa 17351 GG aa 17351
|
|
|
|
GG aa 17351 GG aa 17351 GG bb 15754 GG bb 15754 GG bb 15754
|
|
|
|
GG bb 15754 HH aa 12883 HH aa 12883 HH aa 12883 HH bb 10634
|
|
|
|
HH bb 10634 HH bb 10634 HH bb 10634 HH bb 10634 HH bb 10634
|
|
|
|
II aa 7440 II aa 7440 II bb 6390 II bb 6390 II bb 6390 II bb 6390
|
|
|
|
II bb 6390 JJ aa 3800 JJ aa 3800 JJ aa 3800 JJ aa 3800 JJ bb 1786
|
|
|
|
JJ bb 1786 JJ bb 1786 JJ bb 1786}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.14.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND 100 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.14.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 100 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 979 AA aa 979 AA aa 979 AA aa 979 AA bb 979 AA bb 979
|
|
|
|
AA bb 979 AA bb 979 BB aa 979 BB aa 979 BB aa 979 BB aa 979
|
|
|
|
BB aa 979 BB aa 979 BB bb 979 BB bb 979 BB bb 979 BB bb 979
|
|
|
|
BB bb 979 BB bb 979 CC aa 979 CC aa 979 CC aa 979 CC aa 979
|
|
|
|
CC bb 979 CC bb 979 DD aa 979 DD aa 979 DD aa 979 DD bb 979
|
|
|
|
DD bb 979 DD bb 979 DD bb 979 EE aa 979 EE aa 979 EE bb 979
|
|
|
|
EE bb 979 EE bb 979 FF aa 979 FF aa 979 FF aa 979 FF aa 979
|
|
|
|
FF bb 979 FF bb 979 FF bb 979 FF bb 979 FF bb 979 FF bb 979
|
|
|
|
GG aa 979 GG aa 979 GG aa 979 GG aa 979 GG bb 979 GG bb 979
|
|
|
|
GG bb 979 GG bb 979 HH aa 979 HH aa 979 HH aa 979 HH bb 963
|
|
|
|
HH bb 963 HH bb 963 HH bb 963 HH bb 963 HH bb 963 II aa 899
|
|
|
|
II aa 899 II bb 899 II bb 899 II bb 899 II bb 899 II bb 899
|
|
|
|
JJ aa 899 JJ aa 899 JJ aa 899 JJ aa 899 JJ bb 839 JJ bb 839
|
|
|
|
JJ bb 839 JJ bb 839}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.14.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 100 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 102 AA aa 102 AA aa 102 AA aa 102 AA bb 102 AA bb 102
|
|
|
|
AA bb 102 AA bb 102 BB aa 102 BB aa 102 BB aa 102 BB aa 102
|
|
|
|
BB aa 102 BB aa 102 BB bb 102 BB bb 102 BB bb 102 BB bb 102
|
|
|
|
BB bb 102 BB bb 102 CC aa 102 CC aa 102 CC aa 102 CC aa 102
|
|
|
|
CC bb 102 CC bb 102 DD aa 102 DD aa 102 DD aa 102 DD bb 102
|
|
|
|
DD bb 102 DD bb 102 DD bb 102 EE aa 102 EE aa 102 EE bb 102
|
|
|
|
EE bb 102 EE bb 102 FF aa 102 FF aa 102 FF aa 102 FF aa 102
|
|
|
|
FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102
|
|
|
|
GG aa 113 GG aa 113 GG aa 113 GG aa 113 GG bb 113 GG bb 113
|
|
|
|
GG bb 113 GG bb 113 HH aa 113 HH aa 113 HH aa 113 HH bb 113
|
|
|
|
HH bb 113 HH bb 113 HH bb 113 HH bb 113 HH bb 113 II aa 113
|
|
|
|
II aa 113 II bb 113 II bb 113 II bb 113 II bb 113 II bb 113
|
|
|
|
JJ aa 113 JJ aa 113 JJ aa 113 JJ aa 113 JJ bb 257 JJ bb 257
|
|
|
|
JJ bb 257 JJ bb 257}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.14.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND 100 FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 43803 AA aa 43826 AA aa 44498 AA aa 44514 AA bb 43867
|
|
|
|
AA bb 44110 AA bb 44165 AA bb 44428 BB aa 39290 BB aa 39392
|
|
|
|
BB aa 39640 BB aa 39653 BB aa 39659 BB aa 39805 BB bb 39212
|
|
|
|
BB bb 39260 BB bb 39266 BB bb 39341 BB bb 39347 BB bb 39419
|
|
|
|
CC aa 31953 CC aa 32105 CC aa 32282 CC aa 32554 CC bb 31890
|
|
|
|
CC bb 32366 DD aa 28745 DD aa 29334 DD aa 29366 DD bb 28631
|
|
|
|
DD bb 28796 DD bb 28874 DD bb 29352 EE aa 24781 EE aa 25445
|
|
|
|
EE bb 24790 EE bb 24929 EE bb 25306 FF aa 22349 FF aa 22352
|
|
|
|
FF aa 22401 FF aa 22811 FF bb 22081 FF bb 22149 FF bb 22293
|
|
|
|
FF bb 22445 FF bb 22724 FF bb 22917 GG aa 16717 GG aa 16871
|
|
|
|
GG aa 17016 GG aa 17203 GG bb 16413 GG bb 16422 GG bb 16507
|
|
|
|
GG bb 17191 HH aa 11904 HH aa 12093 HH aa 12403 HH bb 11920
|
|
|
|
HH bb 12153 HH bb 12200 HH bb 12528 HH bb 12553 HH bb 12750
|
|
|
|
II aa 6788 II aa 7042 II bb 6635 II bb 6769 II bb 6997 II bb 7019
|
|
|
|
II bb 7190 JJ aa 2901 JJ aa 3032 JJ aa 3566 JJ aa 3687 JJ bb 2961
|
|
|
|
JJ bb 3446 JJ bb 3464 JJ bb 3543}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.14.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 100 FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 43803 AA aa 43826 AA aa 44498 AA aa 44514 AA bb 41560
|
|
|
|
AA bb 41803 AA bb 41858 AA bb 42121 BB aa 39290 BB aa 39392
|
|
|
|
BB aa 39640 BB aa 39653 BB aa 39659 BB aa 39805 BB bb 36339
|
|
|
|
BB bb 36387 BB bb 36393 BB bb 36468 BB bb 36474 BB bb 36546
|
|
|
|
CC aa 31953 CC aa 32105 CC aa 32282 CC aa 32554 CC bb 29936
|
|
|
|
CC bb 30412 DD aa 28745 DD aa 29334 DD aa 29366 DD bb 27306
|
|
|
|
DD bb 27471 DD bb 27549 DD bb 28027 EE aa 24781 EE aa 25445
|
|
|
|
EE bb 23900 EE bb 24039 EE bb 24416 FF aa 22349 FF aa 22352
|
|
|
|
FF aa 22401 FF aa 22811 FF bb 19918 FF bb 19986 FF bb 20130
|
|
|
|
FF bb 20282 FF bb 20561 FF bb 20754 GG aa 16717 GG aa 16871
|
|
|
|
GG aa 17016 GG aa 17203 GG bb 14816 GG bb 14825 GG bb 14910
|
|
|
|
GG bb 15594 HH aa 11904 HH aa 12093 HH aa 12403 HH bb 9671
|
|
|
|
HH bb 9904 HH bb 9951 HH bb 10279 HH bb 10304 HH bb 10501
|
|
|
|
II aa 6788 II aa 7042 II bb 5585 II bb 5719 II bb 5947 II bb 5969
|
|
|
|
II bb 6140 JJ aa 2901 JJ aa 3032 JJ aa 3566 JJ aa 3687 JJ bb 947
|
|
|
|
JJ bb 1432 JJ bb 1450 JJ bb 1529}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.14.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND 100 FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND 100 FOLLOWING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 100 FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND 100 FOLLOWING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa 43803 44737 43803 44737 AA aa 43826 44737 43826 44737
|
|
|
|
AA aa 44498 44737 44498 44737 AA aa 44514 44737 44514 44737
|
|
|
|
AA bb 43867 44737 41560 42430 AA bb 44110 44737 41803 42430
|
|
|
|
AA bb 44165 44737 41858 42430 AA bb 44428 44737 42121 42430
|
|
|
|
BB aa 39290 40052 39290 40052 BB aa 39392 40052 39392 40052
|
|
|
|
BB aa 39640 40052 39640 40052 BB aa 39653 40052 39653 40052
|
|
|
|
BB aa 39659 40052 39659 40052 BB aa 39805 40052 39805 40052
|
|
|
|
BB bb 39212 40052 36339 37179 BB bb 39260 40052 36387 37179
|
|
|
|
BB bb 39266 40052 36393 37179 BB bb 39341 40052 36468 37179
|
|
|
|
BB bb 39347 40052 36474 37179 BB bb 39419 40052 36546 37179
|
|
|
|
CC aa 31953 32712 31953 32712 CC aa 32105 32712 32105 32712
|
|
|
|
CC aa 32282 32712 32282 32712 CC aa 32554 32712 32554 32712
|
|
|
|
CC bb 31890 32712 29936 30758 CC bb 32366 32712 30412 30758
|
|
|
|
DD aa 28745 29590 28745 29590 DD aa 29334 29590 29334 29590
|
|
|
|
DD aa 29366 29590 29366 29590 DD bb 28631 29590 27306 28265
|
|
|
|
DD bb 28796 29590 27471 28265 DD bb 28874 29590 27549 28265
|
|
|
|
DD bb 29352 29590 28027 28265 EE aa 24781 25558 24781 25558
|
|
|
|
EE aa 25445 25558 25445 25558 EE bb 24790 25558 23900 24668
|
|
|
|
EE bb 24929 25558 24039 24668 EE bb 25306 25558 24416 24668
|
|
|
|
FF aa 22349 23019 22349 23019 FF aa 22352 23019 22352 23019
|
|
|
|
FF aa 22401 23019 22401 23019 FF aa 22811 23019 22811 23019
|
|
|
|
FF bb 22081 23019 19918 20856 FF bb 22149 23019 19986 20856
|
|
|
|
FF bb 22293 23019 20130 20856 FF bb 22445 23019 20282 20856
|
|
|
|
FF bb 22724 23019 20561 20856 FF bb 22917 23019 20754 20856
|
|
|
|
GG aa 16717 17351 16717 17351 GG aa 16871 17351 16871 17351
|
|
|
|
GG aa 17016 17351 17016 17351 GG aa 17203 17351 17203 17351
|
|
|
|
GG bb 16413 17351 14816 15754 GG bb 16422 17351 14825 15754
|
|
|
|
GG bb 16507 17351 14910 15754 GG bb 17191 17351 15594 15754
|
|
|
|
HH aa 11904 12883 11904 12883 HH aa 12093 12883 12093 12883
|
|
|
|
HH aa 12403 12883 12403 12883 HH bb 11920 12883 9671 10634
|
|
|
|
HH bb 12153 12883 9904 10634 HH bb 12200 12883 9951 10634
|
|
|
|
HH bb 12528 12883 10279 10634 HH bb 12553 12883 10304 10634
|
|
|
|
HH bb 12750 12883 10501 10634 II aa 6788 7440 6788 7440
|
|
|
|
II aa 7042 7440 7042 7440 II bb 6635 7440 5585 6390
|
|
|
|
II bb 6769 7440 5719 6390 II bb 6997 7440 5947 6390
|
|
|
|
II bb 7019 7440 5969 6390 II bb 7190 7440 6140 6390
|
|
|
|
JJ aa 2901 3800 2901 3800 JJ aa 3032 3800 3032 3800
|
|
|
|
JJ aa 3566 3800 3566 3800 JJ aa 3687 3800 3687 3800
|
|
|
|
JJ bb 2961 3800 947 1786 JJ bb 3446 3800 1432 1786
|
|
|
|
JJ bb 3464 3800 1450 1786 JJ bb 3543 3800 1529 1786}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.15.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 44737 AA aa 44737 AA aa 44737 AA aa 44737 AA bb 44737
|
|
|
|
AA bb 44737 AA bb 44737 AA bb 44737 BB aa 40052 BB aa 40052
|
|
|
|
BB aa 40052 BB aa 40052 BB aa 40052 BB aa 40052 BB bb 40052
|
|
|
|
BB bb 40052 BB bb 40052 BB bb 40052 BB bb 40052 BB bb 40052
|
|
|
|
CC aa 32712 CC aa 32712 CC aa 32712 CC aa 32712 CC bb 32712
|
|
|
|
CC bb 32712 DD aa 29590 DD aa 29590 DD aa 29590 DD bb 29590
|
|
|
|
DD bb 29590 DD bb 29590 DD bb 29590 EE aa 25558 EE aa 25558
|
|
|
|
EE bb 25558 EE bb 25558 EE bb 25558 FF aa 23019 FF aa 23019
|
|
|
|
FF aa 23019 FF aa 23019 FF bb 23019 FF bb 23019 FF bb 23019
|
|
|
|
FF bb 23019 FF bb 23019 FF bb 23019 GG aa 17351 GG aa 17351
|
|
|
|
GG aa 17351 GG aa 17351 GG bb 17351 GG bb 17351 GG bb 17351
|
|
|
|
GG bb 17351 HH aa 12883 HH aa 12883 HH aa 12883 HH bb 12883
|
|
|
|
HH bb 12883 HH bb 12883 HH bb 12883 HH bb 12883 HH bb 12883
|
|
|
|
II aa 7440 II aa 7440 II bb 7440 II bb 7440 II bb 7440 II bb 7440
|
|
|
|
II bb 7440 JJ aa 3800 JJ aa 3800 JJ aa 3800 JJ aa 3800 JJ bb 3800
|
|
|
|
JJ bb 3800 JJ bb 3800 JJ bb 3800}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.15.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 44737 AA aa 44737 AA aa 44737 AA aa 44737 AA bb 42430
|
|
|
|
AA bb 42430 AA bb 42430 AA bb 42430 BB aa 40052 BB aa 40052
|
|
|
|
BB aa 40052 BB aa 40052 BB aa 40052 BB aa 40052 BB bb 37179
|
|
|
|
BB bb 37179 BB bb 37179 BB bb 37179 BB bb 37179 BB bb 37179
|
|
|
|
CC aa 32712 CC aa 32712 CC aa 32712 CC aa 32712 CC bb 30758
|
|
|
|
CC bb 30758 DD aa 29590 DD aa 29590 DD aa 29590 DD bb 28265
|
|
|
|
DD bb 28265 DD bb 28265 DD bb 28265 EE aa 25558 EE aa 25558
|
|
|
|
EE bb 24668 EE bb 24668 EE bb 24668 FF aa 23019 FF aa 23019
|
|
|
|
FF aa 23019 FF aa 23019 FF bb 20856 FF bb 20856 FF bb 20856
|
|
|
|
FF bb 20856 FF bb 20856 FF bb 20856 GG aa 17351 GG aa 17351
|
|
|
|
GG aa 17351 GG aa 17351 GG bb 15754 GG bb 15754 GG bb 15754
|
|
|
|
GG bb 15754 HH aa 12883 HH aa 12883 HH aa 12883 HH bb 10634
|
|
|
|
HH bb 10634 HH bb 10634 HH bb 10634 HH bb 10634 HH bb 10634
|
|
|
|
II aa 7440 II aa 7440 II bb 6390 II bb 6390 II bb 6390 II bb 6390
|
|
|
|
II bb 6390 JJ aa 3800 JJ aa 3800 JJ aa 3800 JJ aa 3800 JJ bb 1786
|
|
|
|
JJ bb 1786 JJ bb 1786 JJ bb 1786}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.15.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.15.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 979 AA aa 979 AA aa 979 AA aa 979 AA bb 979 AA bb 979
|
|
|
|
AA bb 979 AA bb 979 BB aa 979 BB aa 979 BB aa 979 BB aa 979
|
|
|
|
BB aa 979 BB aa 979 BB bb 979 BB bb 979 BB bb 979 BB bb 979
|
|
|
|
BB bb 979 BB bb 979 CC aa 979 CC aa 979 CC aa 979 CC aa 979
|
|
|
|
CC bb 979 CC bb 979 DD aa 979 DD aa 979 DD aa 979 DD bb 979
|
|
|
|
DD bb 979 DD bb 979 DD bb 979 EE aa 979 EE aa 979 EE bb 979
|
|
|
|
EE bb 979 EE bb 979 FF aa 979 FF aa 979 FF aa 979 FF aa 979
|
|
|
|
FF bb 979 FF bb 979 FF bb 979 FF bb 979 FF bb 979 FF bb 979
|
|
|
|
GG aa 979 GG aa 979 GG aa 979 GG aa 979 GG bb 979 GG bb 979
|
|
|
|
GG bb 979 GG bb 979 HH aa 979 HH aa 979 HH aa 979 HH bb 963
|
|
|
|
HH bb 963 HH bb 963 HH bb 963 HH bb 963 HH bb 963 II aa 899
|
|
|
|
II aa 899 II bb 899 II bb 899 II bb 899 II bb 899 II bb 899
|
|
|
|
JJ aa 899 JJ aa 899 JJ aa 899 JJ aa 899 JJ bb 839 JJ bb 839
|
|
|
|
JJ bb 839 JJ bb 839}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.15.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 102 AA aa 102 AA aa 102 AA aa 102 AA bb 102 AA bb 102
|
|
|
|
AA bb 102 AA bb 102 BB aa 102 BB aa 102 BB aa 102 BB aa 102
|
|
|
|
BB aa 102 BB aa 102 BB bb 102 BB bb 102 BB bb 102 BB bb 102
|
|
|
|
BB bb 102 BB bb 102 CC aa 102 CC aa 102 CC aa 102 CC aa 102
|
|
|
|
CC bb 102 CC bb 102 DD aa 102 DD aa 102 DD aa 102 DD bb 102
|
|
|
|
DD bb 102 DD bb 102 DD bb 102 EE aa 102 EE aa 102 EE bb 102
|
|
|
|
EE bb 102 EE bb 102 FF aa 102 FF aa 102 FF aa 102 FF aa 102
|
|
|
|
FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102
|
|
|
|
GG aa 113 GG aa 113 GG aa 113 GG aa 113 GG bb 113 GG bb 113
|
|
|
|
GG bb 113 GG bb 113 HH aa 113 HH aa 113 HH aa 113 HH bb 113
|
|
|
|
HH bb 113 HH bb 113 HH bb 113 HH bb 113 HH bb 113 II aa 113
|
|
|
|
II aa 113 II bb 113 II bb 113 II bb 113 II bb 113 II bb 113
|
|
|
|
JJ aa 113 JJ aa 113 JJ aa 113 JJ aa 113 JJ bb 257 JJ bb 257
|
|
|
|
JJ bb 257 JJ bb 257}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.15.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 43803 AA aa 43826 AA aa 44498 AA aa 44514 AA bb 43867
|
|
|
|
AA bb 44110 AA bb 44165 AA bb 44428 BB aa 39290 BB aa 39392
|
|
|
|
BB aa 39640 BB aa 39653 BB aa 39659 BB aa 39805 BB bb 39212
|
|
|
|
BB bb 39260 BB bb 39266 BB bb 39341 BB bb 39347 BB bb 39419
|
|
|
|
CC aa 31953 CC aa 32105 CC aa 32282 CC aa 32554 CC bb 31890
|
|
|
|
CC bb 32366 DD aa 28745 DD aa 29334 DD aa 29366 DD bb 28631
|
|
|
|
DD bb 28796 DD bb 28874 DD bb 29352 EE aa 24781 EE aa 25445
|
|
|
|
EE bb 24790 EE bb 24929 EE bb 25306 FF aa 22349 FF aa 22352
|
|
|
|
FF aa 22401 FF aa 22811 FF bb 22081 FF bb 22149 FF bb 22293
|
|
|
|
FF bb 22445 FF bb 22724 FF bb 22917 GG aa 16717 GG aa 16871
|
|
|
|
GG aa 17016 GG aa 17203 GG bb 16413 GG bb 16422 GG bb 16507
|
|
|
|
GG bb 17191 HH aa 11904 HH aa 12093 HH aa 12403 HH bb 11920
|
|
|
|
HH bb 12153 HH bb 12200 HH bb 12528 HH bb 12553 HH bb 12750
|
|
|
|
II aa 6788 II aa 7042 II bb 6635 II bb 6769 II bb 6997 II bb 7019
|
|
|
|
II bb 7190 JJ aa 2901 JJ aa 3032 JJ aa 3566 JJ aa 3687 JJ bb 2961
|
|
|
|
JJ bb 3446 JJ bb 3464 JJ bb 3543}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.15.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 43803 AA aa 43826 AA aa 44498 AA aa 44514 AA bb 41560
|
|
|
|
AA bb 41803 AA bb 41858 AA bb 42121 BB aa 39290 BB aa 39392
|
|
|
|
BB aa 39640 BB aa 39653 BB aa 39659 BB aa 39805 BB bb 36339
|
|
|
|
BB bb 36387 BB bb 36393 BB bb 36468 BB bb 36474 BB bb 36546
|
|
|
|
CC aa 31953 CC aa 32105 CC aa 32282 CC aa 32554 CC bb 29936
|
|
|
|
CC bb 30412 DD aa 28745 DD aa 29334 DD aa 29366 DD bb 27306
|
|
|
|
DD bb 27471 DD bb 27549 DD bb 28027 EE aa 24781 EE aa 25445
|
|
|
|
EE bb 23900 EE bb 24039 EE bb 24416 FF aa 22349 FF aa 22352
|
|
|
|
FF aa 22401 FF aa 22811 FF bb 19918 FF bb 19986 FF bb 20130
|
|
|
|
FF bb 20282 FF bb 20561 FF bb 20754 GG aa 16717 GG aa 16871
|
|
|
|
GG aa 17016 GG aa 17203 GG bb 14816 GG bb 14825 GG bb 14910
|
|
|
|
GG bb 15594 HH aa 11904 HH aa 12093 HH aa 12403 HH bb 9671
|
|
|
|
HH bb 9904 HH bb 9951 HH bb 10279 HH bb 10304 HH bb 10501
|
|
|
|
II aa 6788 II aa 7042 II bb 5585 II bb 5719 II bb 5947 II bb 5969
|
|
|
|
II bb 6140 JJ aa 2901 JJ aa 3032 JJ aa 3566 JJ aa 3687 JJ bb 947
|
|
|
|
JJ bb 1432 JJ bb 1450 JJ bb 1529}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.15.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa 43803 44737 43803 44737 AA aa 43826 44737 43826 44737
|
|
|
|
AA aa 44498 44737 44498 44737 AA aa 44514 44737 44514 44737
|
|
|
|
AA bb 43867 44737 41560 42430 AA bb 44110 44737 41803 42430
|
|
|
|
AA bb 44165 44737 41858 42430 AA bb 44428 44737 42121 42430
|
|
|
|
BB aa 39290 40052 39290 40052 BB aa 39392 40052 39392 40052
|
|
|
|
BB aa 39640 40052 39640 40052 BB aa 39653 40052 39653 40052
|
|
|
|
BB aa 39659 40052 39659 40052 BB aa 39805 40052 39805 40052
|
|
|
|
BB bb 39212 40052 36339 37179 BB bb 39260 40052 36387 37179
|
|
|
|
BB bb 39266 40052 36393 37179 BB bb 39341 40052 36468 37179
|
|
|
|
BB bb 39347 40052 36474 37179 BB bb 39419 40052 36546 37179
|
|
|
|
CC aa 31953 32712 31953 32712 CC aa 32105 32712 32105 32712
|
|
|
|
CC aa 32282 32712 32282 32712 CC aa 32554 32712 32554 32712
|
|
|
|
CC bb 31890 32712 29936 30758 CC bb 32366 32712 30412 30758
|
|
|
|
DD aa 28745 29590 28745 29590 DD aa 29334 29590 29334 29590
|
|
|
|
DD aa 29366 29590 29366 29590 DD bb 28631 29590 27306 28265
|
|
|
|
DD bb 28796 29590 27471 28265 DD bb 28874 29590 27549 28265
|
|
|
|
DD bb 29352 29590 28027 28265 EE aa 24781 25558 24781 25558
|
|
|
|
EE aa 25445 25558 25445 25558 EE bb 24790 25558 23900 24668
|
|
|
|
EE bb 24929 25558 24039 24668 EE bb 25306 25558 24416 24668
|
|
|
|
FF aa 22349 23019 22349 23019 FF aa 22352 23019 22352 23019
|
|
|
|
FF aa 22401 23019 22401 23019 FF aa 22811 23019 22811 23019
|
|
|
|
FF bb 22081 23019 19918 20856 FF bb 22149 23019 19986 20856
|
|
|
|
FF bb 22293 23019 20130 20856 FF bb 22445 23019 20282 20856
|
|
|
|
FF bb 22724 23019 20561 20856 FF bb 22917 23019 20754 20856
|
|
|
|
GG aa 16717 17351 16717 17351 GG aa 16871 17351 16871 17351
|
|
|
|
GG aa 17016 17351 17016 17351 GG aa 17203 17351 17203 17351
|
|
|
|
GG bb 16413 17351 14816 15754 GG bb 16422 17351 14825 15754
|
|
|
|
GG bb 16507 17351 14910 15754 GG bb 17191 17351 15594 15754
|
|
|
|
HH aa 11904 12883 11904 12883 HH aa 12093 12883 12093 12883
|
|
|
|
HH aa 12403 12883 12403 12883 HH bb 11920 12883 9671 10634
|
|
|
|
HH bb 12153 12883 9904 10634 HH bb 12200 12883 9951 10634
|
|
|
|
HH bb 12528 12883 10279 10634 HH bb 12553 12883 10304 10634
|
|
|
|
HH bb 12750 12883 10501 10634 II aa 6788 7440 6788 7440
|
|
|
|
II aa 7042 7440 7042 7440 II bb 6635 7440 5585 6390
|
|
|
|
II bb 6769 7440 5719 6390 II bb 6997 7440 5947 6390
|
|
|
|
II bb 7019 7440 5969 6390 II bb 7190 7440 6140 6390
|
|
|
|
JJ aa 2901 3800 2901 3800 JJ aa 3032 3800 3032 3800
|
|
|
|
JJ aa 3566 3800 3566 3800 JJ aa 3687 3800 3687 3800
|
|
|
|
JJ bb 2961 3800 947 1786 JJ bb 3446 3800 1432 1786
|
|
|
|
JJ bb 3464 3800 1450 1786 JJ bb 3543 3800 1529 1786}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.16.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 0 FOLLOWING AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 4685 AA aa 4685 AA aa 4685 AA aa 4685 AA bb 4685 AA bb 4685
|
|
|
|
AA bb 4685 AA bb 4685 BB aa 7340 BB aa 7340 BB aa 7340 BB aa 7340
|
|
|
|
BB aa 7340 BB aa 7340 BB bb 7340 BB bb 7340 BB bb 7340 BB bb 7340
|
|
|
|
BB bb 7340 BB bb 7340 CC aa 3122 CC aa 3122 CC aa 3122 CC aa 3122
|
|
|
|
CC bb 3122 CC bb 3122 DD aa 4032 DD aa 4032 DD aa 4032 DD bb 4032
|
|
|
|
DD bb 4032 DD bb 4032 DD bb 4032 EE aa 2539 EE aa 2539 EE bb 2539
|
|
|
|
EE bb 2539 EE bb 2539 FF aa 5668 FF aa 5668 FF aa 5668 FF aa 5668
|
|
|
|
FF bb 5668 FF bb 5668 FF bb 5668 FF bb 5668 FF bb 5668 FF bb 5668
|
|
|
|
GG aa 4468 GG aa 4468 GG aa 4468 GG aa 4468 GG bb 4468 GG bb 4468
|
|
|
|
GG bb 4468 GG bb 4468 HH aa 5443 HH aa 5443 HH aa 5443 HH bb 5443
|
|
|
|
HH bb 5443 HH bb 5443 HH bb 5443 HH bb 5443 HH bb 5443 II aa 3640
|
|
|
|
II aa 3640 II bb 3640 II bb 3640 II bb 3640 II bb 3640 II bb 3640
|
|
|
|
JJ aa 3800 JJ aa 3800 JJ aa 3800 JJ aa 3800 JJ bb 3800 JJ bb 3800
|
|
|
|
JJ bb 3800 JJ bb 3800}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.16.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 0 FOLLOWING AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 2307 AA aa 2307 AA aa 2307 AA aa 2307 AA bb 2378 AA bb 2378
|
|
|
|
AA bb 2378 AA bb 2378 BB aa 2873 BB aa 2873 BB aa 2873 BB aa 2873
|
|
|
|
BB aa 2873 BB aa 2873 BB bb 4467 BB bb 4467 BB bb 4467 BB bb 4467
|
|
|
|
BB bb 4467 BB bb 4467 CC aa 1954 CC aa 1954 CC aa 1954 CC aa 1954
|
|
|
|
CC bb 1168 CC bb 1168 DD aa 1325 DD aa 1325 DD aa 1325 DD bb 2707
|
|
|
|
DD bb 2707 DD bb 2707 DD bb 2707 EE aa 890 EE aa 890 EE bb 1649
|
|
|
|
EE bb 1649 EE bb 1649 FF aa 2163 FF aa 2163 FF aa 2163 FF aa 2163
|
|
|
|
FF bb 3505 FF bb 3505 FF bb 3505 FF bb 3505 FF bb 3505 FF bb 3505
|
|
|
|
GG aa 1597 GG aa 1597 GG aa 1597 GG aa 1597 GG bb 2871 GG bb 2871
|
|
|
|
GG bb 2871 GG bb 2871 HH aa 2249 HH aa 2249 HH aa 2249 HH bb 3194
|
|
|
|
HH bb 3194 HH bb 3194 HH bb 3194 HH bb 3194 HH bb 3194 II aa 1050
|
|
|
|
II aa 1050 II bb 2590 II bb 2590 II bb 2590 II bb 2590 II bb 2590
|
|
|
|
JJ aa 2014 JJ aa 2014 JJ aa 2014 JJ aa 2014 JJ bb 1786 JJ bb 1786
|
|
|
|
JJ bb 1786 JJ bb 1786}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.16.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN 0 FOLLOWING AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.16.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN 0 FOLLOWING AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 934 AA aa 934 AA aa 934 AA aa 934 AA bb 870 AA bb 870
|
|
|
|
AA bb 870 AA bb 870 BB aa 762 BB aa 762 BB aa 762 BB aa 762
|
|
|
|
BB aa 762 BB aa 762 BB bb 840 BB bb 840 BB bb 840 BB bb 840
|
|
|
|
BB bb 840 BB bb 840 CC aa 759 CC aa 759 CC aa 759 CC aa 759
|
|
|
|
CC bb 822 CC bb 822 DD aa 845 DD aa 845 DD aa 845 DD bb 959
|
|
|
|
DD bb 959 DD bb 959 DD bb 959 EE aa 777 EE aa 777 EE bb 768
|
|
|
|
EE bb 768 EE bb 768 FF aa 670 FF aa 670 FF aa 670 FF aa 670
|
|
|
|
FF bb 938 FF bb 938 FF bb 938 FF bb 938 FF bb 938 FF bb 938
|
|
|
|
GG aa 634 GG aa 634 GG aa 634 GG aa 634 GG bb 938 GG bb 938
|
|
|
|
GG bb 938 GG bb 938 HH aa 979 HH aa 979 HH aa 979 HH bb 963
|
|
|
|
HH bb 963 HH bb 963 HH bb 963 HH bb 963 HH bb 963 II aa 652
|
|
|
|
II aa 652 II bb 805 II bb 805 II bb 805 II bb 805 II bb 805
|
|
|
|
JJ aa 899 JJ aa 899 JJ aa 899 JJ aa 899 JJ bb 839 JJ bb 839
|
|
|
|
JJ bb 839 JJ bb 839}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.16.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN 0 FOLLOWING AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 223 AA aa 223 AA aa 223 AA aa 223 AA bb 309 AA bb 309
|
|
|
|
AA bb 309 AA bb 309 BB aa 247 BB aa 247 BB aa 247 BB aa 247
|
|
|
|
BB aa 247 BB aa 247 BB bb 633 BB bb 633 BB bb 633 BB bb 633
|
|
|
|
BB bb 633 BB bb 633 CC aa 158 CC aa 158 CC aa 158 CC aa 158
|
|
|
|
CC bb 346 CC bb 346 DD aa 224 DD aa 224 DD aa 224 DD bb 238
|
|
|
|
DD bb 238 DD bb 238 DD bb 238 EE aa 113 EE aa 113 EE bb 252
|
|
|
|
EE bb 252 EE bb 252 FF aa 208 FF aa 208 FF aa 208 FF aa 208
|
|
|
|
FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102 FF bb 102
|
|
|
|
GG aa 148 GG aa 148 GG aa 148 GG aa 148 GG bb 160 GG bb 160
|
|
|
|
GG bb 160 GG bb 160 HH aa 480 HH aa 480 HH aa 480 HH bb 133
|
|
|
|
HH bb 133 HH bb 133 HH bb 133 HH bb 133 HH bb 133 II aa 398
|
|
|
|
II aa 398 II bb 250 II bb 250 II bb 250 II bb 250 II bb 250
|
|
|
|
JJ aa 113 JJ aa 113 JJ aa 113 JJ aa 113 JJ bb 257 JJ bb 257
|
|
|
|
JJ bb 257 JJ bb 257}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.16.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 0 FOLLOWING AND 0 FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 3751 AA aa 3774 AA aa 4446 AA aa 4462 AA bb 3815 AA bb 4058
|
|
|
|
AA bb 4113 AA bb 4376 BB aa 6578 BB aa 6680 BB aa 6928 BB aa 6941
|
|
|
|
BB aa 6947 BB aa 7093 BB bb 6500 BB bb 6548 BB bb 6554 BB bb 6629
|
|
|
|
BB bb 6635 BB bb 6707 CC aa 2363 CC aa 2515 CC aa 2692 CC aa 2964
|
|
|
|
CC bb 2300 CC bb 2776 DD aa 3187 DD aa 3776 DD aa 3808 DD bb 3073
|
|
|
|
DD bb 3238 DD bb 3316 DD bb 3794 EE aa 1762 EE aa 2426 EE bb 1771
|
|
|
|
EE bb 1910 EE bb 2287 FF aa 4998 FF aa 5001 FF aa 5050 FF aa 5460
|
|
|
|
FF bb 4730 FF bb 4798 FF bb 4942 FF bb 5094 FF bb 5373 FF bb 5566
|
|
|
|
GG aa 3834 GG aa 3988 GG aa 4133 GG aa 4320 GG bb 3530 GG bb 3539
|
|
|
|
GG bb 3624 GG bb 4308 HH aa 4464 HH aa 4653 HH aa 4963 HH bb 4480
|
|
|
|
HH bb 4713 HH bb 4760 HH bb 5088 HH bb 5113 HH bb 5310 II aa 2988
|
|
|
|
II aa 3242 II bb 2835 II bb 2969 II bb 3197 II bb 3219 II bb 3390
|
|
|
|
JJ aa 2901 JJ aa 3032 JJ aa 3566 JJ aa 3687 JJ bb 2961 JJ bb 3446
|
|
|
|
JJ bb 3464 JJ bb 3543}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.16.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 0 FOLLOWING AND 0 FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1373 AA aa 1396 AA aa 2068 AA aa 2084 AA bb 1508 AA bb 1751
|
|
|
|
AA bb 1806 AA bb 2069 BB aa 2111 BB aa 2213 BB aa 2461 BB aa 2474
|
|
|
|
BB aa 2480 BB aa 2626 BB bb 3627 BB bb 3675 BB bb 3681 BB bb 3756
|
|
|
|
BB bb 3762 BB bb 3834 CC aa 1195 CC aa 1347 CC aa 1524 CC aa 1796
|
|
|
|
CC bb 346 CC bb 822 DD aa 480 DD aa 1069 DD aa 1101 DD bb 1748
|
|
|
|
DD bb 1913 DD bb 1991 DD bb 2469 EE aa 113 EE aa 777 EE bb 881
|
|
|
|
EE bb 1020 EE bb 1397 FF aa 1493 FF aa 1496 FF aa 1545 FF aa 1955
|
|
|
|
FF bb 2567 FF bb 2635 FF bb 2779 FF bb 2931 FF bb 3210 FF bb 3403
|
|
|
|
GG aa 963 GG aa 1117 GG aa 1262 GG aa 1449 GG bb 1933 GG bb 1942
|
|
|
|
GG bb 2027 GG bb 2711 HH aa 1270 HH aa 1459 HH aa 1769 HH bb 2231
|
|
|
|
HH bb 2464 HH bb 2511 HH bb 2839 HH bb 2864 HH bb 3061 II aa 398
|
|
|
|
II aa 652 II bb 1785 II bb 1919 II bb 2147 II bb 2169 II bb 2340
|
|
|
|
JJ aa 1115 JJ aa 1246 JJ aa 1780 JJ aa 1901 JJ bb 947 JJ bb 1432
|
|
|
|
JJ bb 1450 JJ bb 1529}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.16.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 0 FOLLOWING AND 0 FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 0 FOLLOWING AND 0 FOLLOWING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 0 FOLLOWING AND 0 FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 0 FOLLOWING AND 0 FOLLOWING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa 3751 4685 1373 2307 AA aa 3774 4685 1396 2307
|
|
|
|
AA aa 4446 4685 2068 2307 AA aa 4462 4685 2084 2307
|
|
|
|
AA bb 3815 4685 1508 2378 AA bb 4058 4685 1751 2378
|
|
|
|
AA bb 4113 4685 1806 2378 AA bb 4376 4685 2069 2378
|
|
|
|
BB aa 6578 7340 2111 2873 BB aa 6680 7340 2213 2873
|
|
|
|
BB aa 6928 7340 2461 2873 BB aa 6941 7340 2474 2873
|
|
|
|
BB aa 6947 7340 2480 2873 BB aa 7093 7340 2626 2873
|
|
|
|
BB bb 6500 7340 3627 4467 BB bb 6548 7340 3675 4467
|
|
|
|
BB bb 6554 7340 3681 4467 BB bb 6629 7340 3756 4467
|
|
|
|
BB bb 6635 7340 3762 4467 BB bb 6707 7340 3834 4467
|
|
|
|
CC aa 2363 3122 1195 1954 CC aa 2515 3122 1347 1954
|
|
|
|
CC aa 2692 3122 1524 1954 CC aa 2964 3122 1796 1954
|
|
|
|
CC bb 2300 3122 346 1168 CC bb 2776 3122 822 1168
|
|
|
|
DD aa 3187 4032 480 1325 DD aa 3776 4032 1069 1325
|
|
|
|
DD aa 3808 4032 1101 1325 DD bb 3073 4032 1748 2707
|
|
|
|
DD bb 3238 4032 1913 2707 DD bb 3316 4032 1991 2707
|
|
|
|
DD bb 3794 4032 2469 2707 EE aa 1762 2539 113 890
|
|
|
|
EE aa 2426 2539 777 890 EE bb 1771 2539 881 1649
|
|
|
|
EE bb 1910 2539 1020 1649 EE bb 2287 2539 1397 1649
|
|
|
|
FF aa 4998 5668 1493 2163 FF aa 5001 5668 1496 2163
|
|
|
|
FF aa 5050 5668 1545 2163 FF aa 5460 5668 1955 2163
|
|
|
|
FF bb 4730 5668 2567 3505 FF bb 4798 5668 2635 3505
|
|
|
|
FF bb 4942 5668 2779 3505 FF bb 5094 5668 2931 3505
|
|
|
|
FF bb 5373 5668 3210 3505 FF bb 5566 5668 3403 3505
|
|
|
|
GG aa 3834 4468 963 1597 GG aa 3988 4468 1117 1597
|
|
|
|
GG aa 4133 4468 1262 1597 GG aa 4320 4468 1449 1597
|
|
|
|
GG bb 3530 4468 1933 2871 GG bb 3539 4468 1942 2871
|
|
|
|
GG bb 3624 4468 2027 2871 GG bb 4308 4468 2711 2871
|
|
|
|
HH aa 4464 5443 1270 2249 HH aa 4653 5443 1459 2249
|
|
|
|
HH aa 4963 5443 1769 2249 HH bb 4480 5443 2231 3194
|
|
|
|
HH bb 4713 5443 2464 3194 HH bb 4760 5443 2511 3194
|
|
|
|
HH bb 5088 5443 2839 3194 HH bb 5113 5443 2864 3194
|
|
|
|
HH bb 5310 5443 3061 3194 II aa 2988 3640 398 1050
|
|
|
|
II aa 3242 3640 652 1050 II bb 2835 3640 1785 2590
|
|
|
|
II bb 2969 3640 1919 2590 II bb 3197 3640 2147 2590
|
|
|
|
II bb 3219 3640 2169 2590 II bb 3390 3640 2340 2590
|
|
|
|
JJ aa 2901 3800 1115 2014 JJ aa 3032 3800 1246 2014
|
|
|
|
JJ aa 3566 3800 1780 2014 JJ aa 3687 3800 1901 2014
|
|
|
|
JJ bb 2961 3800 947 1786 JJ bb 3446 3800 1432 1786
|
|
|
|
JJ bb 3464 3800 1450 1786 JJ bb 3543 3800 1529 1786}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.17.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 1 FOLLOWING AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {}
|
|
|
|
BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} CC aa {}
|
|
|
|
CC aa {} CC aa {} CC aa {} CC bb {} CC bb {} DD aa {} DD aa {}
|
|
|
|
DD aa {} DD bb {} DD bb {} DD bb {} DD bb {} EE aa {} EE aa {}
|
|
|
|
EE bb {} EE bb {} EE bb {} FF aa {} FF aa {} FF aa {} FF aa {}
|
|
|
|
FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} GG aa {}
|
|
|
|
GG aa {} GG aa {} GG aa {} GG bb {} GG bb {} GG bb {} GG bb {}
|
|
|
|
HH aa {} HH aa {} HH aa {} HH bb {} HH bb {} HH bb {} HH bb {}
|
|
|
|
HH bb {} HH bb {} II aa {} II aa {} II bb {} II bb {} II bb {}
|
|
|
|
II bb {} II bb {} JJ aa {} JJ aa {} JJ aa {} JJ aa {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {} JJ bb {}}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.17.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {}
|
|
|
|
BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} CC aa {}
|
|
|
|
CC aa {} CC aa {} CC aa {} CC bb {} CC bb {} DD aa {} DD aa {}
|
|
|
|
DD aa {} DD bb {} DD bb {} DD bb {} DD bb {} EE aa {} EE aa {}
|
|
|
|
EE bb {} EE bb {} EE bb {} FF aa {} FF aa {} FF aa {} FF aa {}
|
|
|
|
FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} GG aa {}
|
|
|
|
GG aa {} GG aa {} GG aa {} GG bb {} GG bb {} GG bb {} GG bb {}
|
|
|
|
HH aa {} HH aa {} HH aa {} HH bb {} HH bb {} HH bb {} HH bb {}
|
|
|
|
HH bb {} HH bb {} II aa {} II aa {} II bb {} II bb {} II bb {}
|
|
|
|
II bb {} II bb {} JJ aa {} JJ aa {} JJ aa {} JJ aa {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {} JJ bb {}}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.17.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN 1 FOLLOWING AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.17.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {}
|
|
|
|
BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} CC aa {}
|
|
|
|
CC aa {} CC aa {} CC aa {} CC bb {} CC bb {} DD aa {} DD aa {}
|
|
|
|
DD aa {} DD bb {} DD bb {} DD bb {} DD bb {} EE aa {} EE aa {}
|
|
|
|
EE bb {} EE bb {} EE bb {} FF aa {} FF aa {} FF aa {} FF aa {}
|
|
|
|
FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} GG aa {}
|
|
|
|
GG aa {} GG aa {} GG aa {} GG bb {} GG bb {} GG bb {} GG bb {}
|
|
|
|
HH aa {} HH aa {} HH aa {} HH bb {} HH bb {} HH bb {} HH bb {}
|
|
|
|
HH bb {} HH bb {} II aa {} II aa {} II bb {} II bb {} II bb {}
|
|
|
|
II bb {} II bb {} JJ aa {} JJ aa {} JJ aa {} JJ aa {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {} JJ bb {}}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.17.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {}
|
|
|
|
BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} CC aa {}
|
|
|
|
CC aa {} CC aa {} CC aa {} CC bb {} CC bb {} DD aa {} DD aa {}
|
|
|
|
DD aa {} DD bb {} DD bb {} DD bb {} DD bb {} EE aa {} EE aa {}
|
|
|
|
EE bb {} EE bb {} EE bb {} FF aa {} FF aa {} FF aa {} FF aa {}
|
|
|
|
FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} GG aa {}
|
|
|
|
GG aa {} GG aa {} GG aa {} GG bb {} GG bb {} GG bb {} GG bb {}
|
|
|
|
HH aa {} HH aa {} HH aa {} HH bb {} HH bb {} HH bb {} HH bb {}
|
|
|
|
HH bb {} HH bb {} II aa {} II aa {} II bb {} II bb {} II bb {}
|
|
|
|
II bb {} II bb {} JJ aa {} JJ aa {} JJ aa {} JJ aa {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {} JJ bb {}}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.17.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 1 FOLLOWING AND 0 FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {}
|
|
|
|
BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} CC aa {}
|
|
|
|
CC aa {} CC aa {} CC aa {} CC bb {} CC bb {} DD aa {} DD aa {}
|
|
|
|
DD aa {} DD bb {} DD bb {} DD bb {} DD bb {} EE aa {} EE aa {}
|
|
|
|
EE bb {} EE bb {} EE bb {} FF aa {} FF aa {} FF aa {} FF aa {}
|
|
|
|
FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} GG aa {}
|
|
|
|
GG aa {} GG aa {} GG aa {} GG bb {} GG bb {} GG bb {} GG bb {}
|
|
|
|
HH aa {} HH aa {} HH aa {} HH bb {} HH bb {} HH bb {} HH bb {}
|
|
|
|
HH bb {} HH bb {} II aa {} II aa {} II bb {} II bb {} II bb {}
|
|
|
|
II bb {} II bb {} JJ aa {} JJ aa {} JJ aa {} JJ aa {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {} JJ bb {}}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.17.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND 0 FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa {} AA aa {} AA aa {} AA aa {} AA bb {} AA bb {} AA bb {}
|
|
|
|
AA bb {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {} BB aa {}
|
|
|
|
BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} BB bb {} CC aa {}
|
|
|
|
CC aa {} CC aa {} CC aa {} CC bb {} CC bb {} DD aa {} DD aa {}
|
|
|
|
DD aa {} DD bb {} DD bb {} DD bb {} DD bb {} EE aa {} EE aa {}
|
|
|
|
EE bb {} EE bb {} EE bb {} FF aa {} FF aa {} FF aa {} FF aa {}
|
|
|
|
FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} FF bb {} GG aa {}
|
|
|
|
GG aa {} GG aa {} GG aa {} GG bb {} GG bb {} GG bb {} GG bb {}
|
|
|
|
HH aa {} HH aa {} HH aa {} HH bb {} HH bb {} HH bb {} HH bb {}
|
|
|
|
HH bb {} HH bb {} II aa {} II aa {} II bb {} II bb {} II bb {}
|
|
|
|
II bb {} II bb {} JJ aa {} JJ aa {} JJ aa {} JJ aa {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {} JJ bb {}}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.17.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 1 FOLLOWING AND 0 FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 1 FOLLOWING AND 0 FOLLOWING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND 0 FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND 0 FOLLOWING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa {} {} {} {} AA aa {} {} {} {} AA aa {} {} {} {}
|
|
|
|
AA aa {} {} {} {} AA bb {} {} {} {} AA bb {} {} {} {}
|
|
|
|
AA bb {} {} {} {} AA bb {} {} {} {} BB aa {} {} {} {}
|
|
|
|
BB aa {} {} {} {} BB aa {} {} {} {} BB aa {} {} {} {}
|
|
|
|
BB aa {} {} {} {} BB aa {} {} {} {} BB bb {} {} {} {}
|
|
|
|
BB bb {} {} {} {} BB bb {} {} {} {} BB bb {} {} {} {}
|
|
|
|
BB bb {} {} {} {} BB bb {} {} {} {} CC aa {} {} {} {}
|
|
|
|
CC aa {} {} {} {} CC aa {} {} {} {} CC aa {} {} {} {}
|
|
|
|
CC bb {} {} {} {} CC bb {} {} {} {} DD aa {} {} {} {}
|
|
|
|
DD aa {} {} {} {} DD aa {} {} {} {} DD bb {} {} {} {}
|
|
|
|
DD bb {} {} {} {} DD bb {} {} {} {} DD bb {} {} {} {}
|
|
|
|
EE aa {} {} {} {} EE aa {} {} {} {} EE bb {} {} {} {}
|
|
|
|
EE bb {} {} {} {} EE bb {} {} {} {} FF aa {} {} {} {}
|
|
|
|
FF aa {} {} {} {} FF aa {} {} {} {} FF aa {} {} {} {}
|
|
|
|
FF bb {} {} {} {} FF bb {} {} {} {} FF bb {} {} {} {}
|
|
|
|
FF bb {} {} {} {} FF bb {} {} {} {} FF bb {} {} {} {}
|
|
|
|
GG aa {} {} {} {} GG aa {} {} {} {} GG aa {} {} {} {}
|
|
|
|
GG aa {} {} {} {} GG bb {} {} {} {} GG bb {} {} {} {}
|
|
|
|
GG bb {} {} {} {} GG bb {} {} {} {} HH aa {} {} {} {}
|
|
|
|
HH aa {} {} {} {} HH aa {} {} {} {} HH bb {} {} {} {}
|
|
|
|
HH bb {} {} {} {} HH bb {} {} {} {} HH bb {} {} {} {}
|
|
|
|
HH bb {} {} {} {} HH bb {} {} {} {} II aa {} {} {} {}
|
|
|
|
II aa {} {} {} {} II bb {} {} {} {} II bb {} {} {} {}
|
|
|
|
II bb {} {} {} {} II bb {} {} {} {} II bb {} {} {} {}
|
|
|
|
JJ aa {} {} {} {} JJ aa {} {} {} {} JJ aa {} {} {} {}
|
|
|
|
JJ aa {} {} {} {} JJ bb {} {} {} {} JJ bb {} {} {} {}
|
|
|
|
JJ bb {} {} {} {} JJ bb {} {} {} {}}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.18.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 1 FOLLOWING AND 5 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 22701 AA aa 22701 AA aa 22701 AA aa 22701 AA bb 22701
|
|
|
|
AA bb 22701 AA bb 22701 AA bb 22701 BB aa 19829 BB aa 19829
|
|
|
|
BB aa 19829 BB aa 19829 BB aa 19829 BB aa 19829 BB bb 19829
|
|
|
|
BB bb 19829 BB bb 19829 BB bb 19829 BB bb 19829 BB bb 19829
|
|
|
|
CC aa 22150 CC aa 22150 CC aa 22150 CC aa 22150 CC bb 22150
|
|
|
|
CC bb 22150 DD aa 21758 DD aa 21758 DD aa 21758 DD bb 21758
|
|
|
|
DD bb 21758 DD bb 21758 DD bb 21758 EE aa 23019 EE aa 23019
|
|
|
|
EE bb 23019 EE bb 23019 EE bb 23019 FF aa 17351 FF aa 17351
|
|
|
|
FF aa 17351 FF aa 17351 FF bb 17351 FF bb 17351 FF bb 17351
|
|
|
|
FF bb 17351 FF bb 17351 FF bb 17351 GG aa 12883 GG aa 12883
|
|
|
|
GG aa 12883 GG aa 12883 GG bb 12883 GG bb 12883 GG bb 12883
|
|
|
|
GG bb 12883 HH aa 7440 HH aa 7440 HH aa 7440 HH bb 7440
|
|
|
|
HH bb 7440 HH bb 7440 HH bb 7440 HH bb 7440 HH bb 7440 II aa 3800
|
|
|
|
II aa 3800 II bb 3800 II bb 3800 II bb 3800 II bb 3800 II bb 3800
|
|
|
|
JJ aa {} JJ aa {} JJ aa {} JJ aa {} JJ bb {} JJ bb {} JJ bb {}
|
|
|
|
JJ bb {}}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.18.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND 5 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 12840 AA aa 12840 AA aa 12840 AA aa 12840 AA bb 11787
|
|
|
|
AA bb 11787 AA bb 11787 AA bb 11787 BB aa 11621 BB aa 11621
|
|
|
|
BB aa 11621 BB aa 11621 BB aa 11621 BB aa 11621 BB bb 8044
|
|
|
|
BB bb 8044 BB bb 8044 BB bb 8044 BB bb 8044 BB bb 8044 CC aa 7739
|
|
|
|
CC aa 7739 CC aa 7739 CC aa 7739 CC bb 8734 CC bb 8734
|
|
|
|
DD aa 10914 DD aa 10914 DD aa 10914 DD bb 9804 DD bb 9804
|
|
|
|
DD bb 9804 DD bb 9804 EE aa 11785 EE aa 11785 EE bb 12385
|
|
|
|
EE bb 12385 EE bb 12385 FF aa 13416 FF aa 13416 FF aa 13416
|
|
|
|
FF aa 13416 FF bb 10961 FF bb 10961 FF bb 10961 FF bb 10961
|
|
|
|
FF bb 10961 FF bb 10961 GG aa 11954 GG aa 11954 GG aa 11954
|
|
|
|
GG aa 11954 GG bb 11097 GG bb 11097 GG bb 11097 GG bb 11097
|
|
|
|
HH aa 10634 HH aa 10634 HH aa 10634 HH bb 7440 HH bb 7440
|
|
|
|
HH bb 7440 HH bb 7440 HH bb 7440 HH bb 7440 II aa 6390 II aa 6390
|
|
|
|
II bb 3800 II bb 3800 II bb 3800 II bb 3800 II bb 3800 JJ aa 1786
|
|
|
|
JJ aa 1786 JJ aa 1786 JJ aa 1786 JJ bb {} JJ bb {} JJ bb {}
|
|
|
|
JJ bb {}}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.18.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN 1 FOLLOWING AND 5 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.18.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND 5 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 870 AA aa 870 AA aa 870 AA aa 870 AA bb 845 AA bb 845
|
|
|
|
AA bb 845 AA bb 845 BB aa 959 BB aa 959 BB aa 959 BB aa 959
|
|
|
|
BB aa 959 BB aa 959 BB bb 959 BB bb 959 BB bb 959 BB bb 959
|
|
|
|
BB bb 959 BB bb 959 CC aa 959 CC aa 959 CC aa 959 CC aa 959
|
|
|
|
CC bb 959 CC bb 959 DD aa 959 DD aa 959 DD aa 959 DD bb 938
|
|
|
|
DD bb 938 DD bb 938 DD bb 938 EE aa 938 EE aa 938 EE bb 979
|
|
|
|
EE bb 979 EE bb 979 FF aa 979 FF aa 979 FF aa 979 FF aa 979
|
|
|
|
FF bb 979 FF bb 979 FF bb 979 FF bb 979 FF bb 979 FF bb 979
|
|
|
|
GG aa 979 GG aa 979 GG aa 979 GG aa 979 GG bb 979 GG bb 979
|
|
|
|
GG bb 979 GG bb 979 HH aa 963 HH aa 963 HH aa 963 HH bb 899
|
|
|
|
HH bb 899 HH bb 899 HH bb 899 HH bb 899 HH bb 899 II aa 899
|
|
|
|
II aa 899 II bb 899 II bb 899 II bb 899 II bb 899 II bb 899
|
|
|
|
JJ aa 839 JJ aa 839 JJ aa 839 JJ aa 839 JJ bb {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {}}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.18.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND 5 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 158 AA aa 158 AA aa 158 AA aa 158 AA bb 158 AA bb 158
|
|
|
|
AA bb 158 AA bb 158 BB aa 158 BB aa 158 BB aa 158 BB aa 158
|
|
|
|
BB aa 158 BB aa 158 BB bb 113 BB bb 113 BB bb 113 BB bb 113
|
|
|
|
BB bb 113 BB bb 113 CC aa 113 CC aa 113 CC aa 113 CC aa 113
|
|
|
|
CC bb 113 CC bb 113 DD aa 102 DD aa 102 DD aa 102 DD bb 102
|
|
|
|
DD bb 102 DD bb 102 DD bb 102 EE aa 102 EE aa 102 EE bb 102
|
|
|
|
EE bb 102 EE bb 102 FF aa 102 FF aa 102 FF aa 102 FF aa 102
|
|
|
|
FF bb 133 FF bb 133 FF bb 133 FF bb 133 FF bb 133 FF bb 133
|
|
|
|
GG aa 133 GG aa 133 GG aa 133 GG aa 133 GG bb 113 GG bb 113
|
|
|
|
GG bb 113 GG bb 113 HH aa 113 HH aa 113 HH aa 113 HH bb 113
|
|
|
|
HH bb 113 HH bb 113 HH bb 113 HH bb 113 HH bb 113 II aa 113
|
|
|
|
II aa 113 II bb 113 II bb 113 II bb 113 II bb 113 II bb 113
|
|
|
|
JJ aa 257 JJ aa 257 JJ aa 257 JJ aa 257 JJ bb {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {}}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.18.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 1 FOLLOWING AND 5 FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 22701 AA aa 22701 AA aa 22701 AA aa 22701 AA bb 22701
|
|
|
|
AA bb 22701 AA bb 22701 AA bb 22701 BB aa 19829 BB aa 19829
|
|
|
|
BB aa 19829 BB aa 19829 BB aa 19829 BB aa 19829 BB bb 19829
|
|
|
|
BB bb 19829 BB bb 19829 BB bb 19829 BB bb 19829 BB bb 19829
|
|
|
|
CC aa 22150 CC aa 22150 CC aa 22150 CC aa 22150 CC bb 22150
|
|
|
|
CC bb 22150 DD aa 21758 DD aa 21758 DD aa 21758 DD bb 21758
|
|
|
|
DD bb 21758 DD bb 21758 DD bb 21758 EE aa 23019 EE aa 23019
|
|
|
|
EE bb 23019 EE bb 23019 EE bb 23019 FF aa 17351 FF aa 17351
|
|
|
|
FF aa 17351 FF aa 17351 FF bb 17351 FF bb 17351 FF bb 17351
|
|
|
|
FF bb 17351 FF bb 17351 FF bb 17351 GG aa 12883 GG aa 12883
|
|
|
|
GG aa 12883 GG aa 12883 GG bb 12883 GG bb 12883 GG bb 12883
|
|
|
|
GG bb 12883 HH aa 7440 HH aa 7440 HH aa 7440 HH bb 7440
|
|
|
|
HH bb 7440 HH bb 7440 HH bb 7440 HH bb 7440 HH bb 7440 II aa 3800
|
|
|
|
II aa 3800 II bb 3800 II bb 3800 II bb 3800 II bb 3800 II bb 3800
|
|
|
|
JJ aa {} JJ aa {} JJ aa {} JJ aa {} JJ bb {} JJ bb {} JJ bb {}
|
|
|
|
JJ bb {}}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.18.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND 5 FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 12840 AA aa 12840 AA aa 12840 AA aa 12840 AA bb 11787
|
|
|
|
AA bb 11787 AA bb 11787 AA bb 11787 BB aa 11621 BB aa 11621
|
|
|
|
BB aa 11621 BB aa 11621 BB aa 11621 BB aa 11621 BB bb 8044
|
|
|
|
BB bb 8044 BB bb 8044 BB bb 8044 BB bb 8044 BB bb 8044 CC aa 7739
|
|
|
|
CC aa 7739 CC aa 7739 CC aa 7739 CC bb 8734 CC bb 8734
|
|
|
|
DD aa 10914 DD aa 10914 DD aa 10914 DD bb 9804 DD bb 9804
|
|
|
|
DD bb 9804 DD bb 9804 EE aa 11785 EE aa 11785 EE bb 12385
|
|
|
|
EE bb 12385 EE bb 12385 FF aa 13416 FF aa 13416 FF aa 13416
|
|
|
|
FF aa 13416 FF bb 10961 FF bb 10961 FF bb 10961 FF bb 10961
|
|
|
|
FF bb 10961 FF bb 10961 GG aa 11954 GG aa 11954 GG aa 11954
|
|
|
|
GG aa 11954 GG bb 11097 GG bb 11097 GG bb 11097 GG bb 11097
|
|
|
|
HH aa 10634 HH aa 10634 HH aa 10634 HH bb 7440 HH bb 7440
|
|
|
|
HH bb 7440 HH bb 7440 HH bb 7440 HH bb 7440 II aa 6390 II aa 6390
|
|
|
|
II bb 3800 II bb 3800 II bb 3800 II bb 3800 II bb 3800 JJ aa 1786
|
|
|
|
JJ aa 1786 JJ aa 1786 JJ aa 1786 JJ bb {} JJ bb {} JJ bb {}
|
|
|
|
JJ bb {}}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.18.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 1 FOLLOWING AND 5 FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 1 FOLLOWING AND 5 FOLLOWING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND 5 FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND 5 FOLLOWING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa 22701 22701 12840 12840 AA aa 22701 22701 12840 12840
|
|
|
|
AA aa 22701 22701 12840 12840 AA aa 22701 22701 12840 12840
|
|
|
|
AA bb 22701 22701 11787 11787 AA bb 22701 22701 11787 11787
|
|
|
|
AA bb 22701 22701 11787 11787 AA bb 22701 22701 11787 11787
|
|
|
|
BB aa 19829 19829 11621 11621 BB aa 19829 19829 11621 11621
|
|
|
|
BB aa 19829 19829 11621 11621 BB aa 19829 19829 11621 11621
|
|
|
|
BB aa 19829 19829 11621 11621 BB aa 19829 19829 11621 11621
|
|
|
|
BB bb 19829 19829 8044 8044 BB bb 19829 19829 8044 8044
|
|
|
|
BB bb 19829 19829 8044 8044 BB bb 19829 19829 8044 8044
|
|
|
|
BB bb 19829 19829 8044 8044 BB bb 19829 19829 8044 8044
|
|
|
|
CC aa 22150 22150 7739 7739 CC aa 22150 22150 7739 7739
|
|
|
|
CC aa 22150 22150 7739 7739 CC aa 22150 22150 7739 7739
|
|
|
|
CC bb 22150 22150 8734 8734 CC bb 22150 22150 8734 8734
|
|
|
|
DD aa 21758 21758 10914 10914 DD aa 21758 21758 10914 10914
|
|
|
|
DD aa 21758 21758 10914 10914 DD bb 21758 21758 9804 9804
|
|
|
|
DD bb 21758 21758 9804 9804 DD bb 21758 21758 9804 9804
|
|
|
|
DD bb 21758 21758 9804 9804 EE aa 23019 23019 11785 11785
|
|
|
|
EE aa 23019 23019 11785 11785 EE bb 23019 23019 12385 12385
|
|
|
|
EE bb 23019 23019 12385 12385 EE bb 23019 23019 12385 12385
|
|
|
|
FF aa 17351 17351 13416 13416 FF aa 17351 17351 13416 13416
|
|
|
|
FF aa 17351 17351 13416 13416 FF aa 17351 17351 13416 13416
|
|
|
|
FF bb 17351 17351 10961 10961 FF bb 17351 17351 10961 10961
|
|
|
|
FF bb 17351 17351 10961 10961 FF bb 17351 17351 10961 10961
|
|
|
|
FF bb 17351 17351 10961 10961 FF bb 17351 17351 10961 10961
|
|
|
|
GG aa 12883 12883 11954 11954 GG aa 12883 12883 11954 11954
|
|
|
|
GG aa 12883 12883 11954 11954 GG aa 12883 12883 11954 11954
|
|
|
|
GG bb 12883 12883 11097 11097 GG bb 12883 12883 11097 11097
|
|
|
|
GG bb 12883 12883 11097 11097 GG bb 12883 12883 11097 11097
|
|
|
|
HH aa 7440 7440 10634 10634 HH aa 7440 7440 10634 10634
|
|
|
|
HH aa 7440 7440 10634 10634 HH bb 7440 7440 7440 7440
|
|
|
|
HH bb 7440 7440 7440 7440 HH bb 7440 7440 7440 7440
|
|
|
|
HH bb 7440 7440 7440 7440 HH bb 7440 7440 7440 7440
|
|
|
|
HH bb 7440 7440 7440 7440 II aa 3800 3800 6390 6390
|
|
|
|
II aa 3800 3800 6390 6390 II bb 3800 3800 3800 3800
|
|
|
|
II bb 3800 3800 3800 3800 II bb 3800 3800 3800 3800
|
|
|
|
II bb 3800 3800 3800 3800 II bb 3800 3800 3800 3800
|
|
|
|
JJ aa {} {} 1786 1786 JJ aa {} {} 1786 1786 JJ aa {} {} 1786 1786
|
|
|
|
JJ aa {} {} 1786 1786 JJ bb {} {} {} {} JJ bb {} {} {} {}
|
|
|
|
JJ bb {} {} {} {} JJ bb {} {} {} {}}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
do_execsql_test 1.19.1 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 40052 AA aa 40052 AA aa 40052 AA aa 40052 AA bb 40052
|
|
|
|
AA bb 40052 AA bb 40052 AA bb 40052 BB aa 32712 BB aa 32712
|
|
|
|
BB aa 32712 BB aa 32712 BB aa 32712 BB aa 32712 BB bb 32712
|
|
|
|
BB bb 32712 BB bb 32712 BB bb 32712 BB bb 32712 BB bb 32712
|
|
|
|
CC aa 29590 CC aa 29590 CC aa 29590 CC aa 29590 CC bb 29590
|
|
|
|
CC bb 29590 DD aa 25558 DD aa 25558 DD aa 25558 DD bb 25558
|
|
|
|
DD bb 25558 DD bb 25558 DD bb 25558 EE aa 23019 EE aa 23019
|
|
|
|
EE bb 23019 EE bb 23019 EE bb 23019 FF aa 17351 FF aa 17351
|
|
|
|
FF aa 17351 FF aa 17351 FF bb 17351 FF bb 17351 FF bb 17351
|
|
|
|
FF bb 17351 FF bb 17351 FF bb 17351 GG aa 12883 GG aa 12883
|
|
|
|
GG aa 12883 GG aa 12883 GG bb 12883 GG bb 12883 GG bb 12883
|
|
|
|
GG bb 12883 HH aa 7440 HH aa 7440 HH aa 7440 HH bb 7440
|
|
|
|
HH bb 7440 HH bb 7440 HH bb 7440 HH bb 7440 HH bb 7440 II aa 3800
|
|
|
|
II aa 3800 II bb 3800 II bb 3800 II bb 3800 II bb 3800 II bb 3800
|
|
|
|
JJ aa {} JJ aa {} JJ aa {} JJ aa {} JJ bb {} JJ bb {} JJ bb {}
|
|
|
|
JJ bb {}}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.19.2 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 42430 AA aa 42430 AA aa 42430 AA aa 42430 AA bb 40052
|
|
|
|
AA bb 40052 AA bb 40052 AA bb 40052 BB aa 37179 BB aa 37179
|
|
|
|
BB aa 37179 BB aa 37179 BB aa 37179 BB aa 37179 BB bb 32712
|
|
|
|
BB bb 32712 BB bb 32712 BB bb 32712 BB bb 32712 BB bb 32712
|
|
|
|
CC aa 30758 CC aa 30758 CC aa 30758 CC aa 30758 CC bb 29590
|
|
|
|
CC bb 29590 DD aa 28265 DD aa 28265 DD aa 28265 DD bb 25558
|
|
|
|
DD bb 25558 DD bb 25558 DD bb 25558 EE aa 24668 EE aa 24668
|
|
|
|
EE bb 23019 EE bb 23019 EE bb 23019 FF aa 20856 FF aa 20856
|
|
|
|
FF aa 20856 FF aa 20856 FF bb 17351 FF bb 17351 FF bb 17351
|
|
|
|
FF bb 17351 FF bb 17351 FF bb 17351 GG aa 15754 GG aa 15754
|
|
|
|
GG aa 15754 GG aa 15754 GG bb 12883 GG bb 12883 GG bb 12883
|
|
|
|
GG bb 12883 HH aa 10634 HH aa 10634 HH aa 10634 HH bb 7440
|
|
|
|
HH bb 7440 HH bb 7440 HH bb 7440 HH bb 7440 HH bb 7440 II aa 6390
|
|
|
|
II aa 6390 II bb 3800 II bb 3800 II bb 3800 II bb 3800 II bb 3800
|
|
|
|
JJ aa 1786 JJ aa 1786 JJ aa 1786 JJ aa 1786 JJ bb {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {}}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.19.3 {
|
|
|
|
SELECT a, b, rank() OVER (ORDER BY a GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 1 AA aa 1 AA aa 1 AA aa 1 AA bb 1 AA bb 1 AA bb 1
|
|
|
|
AA bb 1 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9 BB aa 9
|
|
|
|
BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 BB bb 9 CC aa 21
|
|
|
|
CC aa 21 CC aa 21 CC aa 21 CC bb 21 CC bb 21 DD aa 27 DD aa 27
|
|
|
|
DD aa 27 DD bb 27 DD bb 27 DD bb 27 DD bb 27 EE aa 34 EE aa 34
|
|
|
|
EE bb 34 EE bb 34 EE bb 34 FF aa 39 FF aa 39 FF aa 39 FF aa 39
|
|
|
|
FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 FF bb 39 GG aa 49
|
|
|
|
GG aa 49 GG aa 49 GG aa 49 GG bb 49 GG bb 49 GG bb 49 GG bb 49
|
|
|
|
HH aa 57 HH aa 57 HH aa 57 HH bb 57 HH bb 57 HH bb 57 HH bb 57
|
|
|
|
HH bb 57 HH bb 57 II aa 66 II aa 66 II bb 66 II bb 66 II bb 66
|
|
|
|
II bb 66 II bb 66 JJ aa 73 JJ aa 73 JJ aa 73 JJ aa 73 JJ bb 73
|
|
|
|
JJ bb 73 JJ bb 73 JJ bb 73}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.19.4 {
|
|
|
|
SELECT a, b, max(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 979 AA aa 979 AA aa 979 AA aa 979 AA bb 979 AA bb 979
|
|
|
|
AA bb 979 AA bb 979 BB aa 979 BB aa 979 BB aa 979 BB aa 979
|
|
|
|
BB aa 979 BB aa 979 BB bb 979 BB bb 979 BB bb 979 BB bb 979
|
|
|
|
BB bb 979 BB bb 979 CC aa 979 CC aa 979 CC aa 979 CC aa 979
|
|
|
|
CC bb 979 CC bb 979 DD aa 979 DD aa 979 DD aa 979 DD bb 979
|
|
|
|
DD bb 979 DD bb 979 DD bb 979 EE aa 979 EE aa 979 EE bb 979
|
|
|
|
EE bb 979 EE bb 979 FF aa 979 FF aa 979 FF aa 979 FF aa 979
|
|
|
|
FF bb 979 FF bb 979 FF bb 979 FF bb 979 FF bb 979 FF bb 979
|
|
|
|
GG aa 979 GG aa 979 GG aa 979 GG aa 979 GG bb 979 GG bb 979
|
|
|
|
GG bb 979 GG bb 979 HH aa 963 HH aa 963 HH aa 963 HH bb 899
|
|
|
|
HH bb 899 HH bb 899 HH bb 899 HH bb 899 HH bb 899 II aa 899
|
|
|
|
II aa 899 II bb 899 II bb 899 II bb 899 II bb 899 II bb 899
|
|
|
|
JJ aa 839 JJ aa 839 JJ aa 839 JJ aa 839 JJ bb {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {}}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.19.5 {
|
|
|
|
SELECT a, b, min(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 102 AA aa 102 AA aa 102 AA aa 102 AA bb 102 AA bb 102
|
|
|
|
AA bb 102 AA bb 102 BB aa 102 BB aa 102 BB aa 102 BB aa 102
|
|
|
|
BB aa 102 BB aa 102 BB bb 102 BB bb 102 BB bb 102 BB bb 102
|
|
|
|
BB bb 102 BB bb 102 CC aa 102 CC aa 102 CC aa 102 CC aa 102
|
|
|
|
CC bb 102 CC bb 102 DD aa 102 DD aa 102 DD aa 102 DD bb 102
|
|
|
|
DD bb 102 DD bb 102 DD bb 102 EE aa 102 EE aa 102 EE bb 102
|
|
|
|
EE bb 102 EE bb 102 FF aa 102 FF aa 102 FF aa 102 FF aa 102
|
|
|
|
FF bb 113 FF bb 113 FF bb 113 FF bb 113 FF bb 113 FF bb 113
|
|
|
|
GG aa 113 GG aa 113 GG aa 113 GG aa 113 GG bb 113 GG bb 113
|
|
|
|
GG bb 113 GG bb 113 HH aa 113 HH aa 113 HH aa 113 HH bb 113
|
|
|
|
HH bb 113 HH bb 113 HH bb 113 HH bb 113 HH bb 113 II aa 113
|
|
|
|
II aa 113 II bb 113 II bb 113 II bb 113 II bb 113 II bb 113
|
|
|
|
JJ aa 257 JJ aa 257 JJ aa 257 JJ aa 257 JJ bb {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {}}
|
2019-03-08 23:57:05 +03:00
|
|
|
|
2019-03-15 23:46:19 +03:00
|
|
|
do_execsql_test 1.19.6 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 40052 AA aa 40052 AA aa 40052 AA aa 40052 AA bb 40052
|
|
|
|
AA bb 40052 AA bb 40052 AA bb 40052 BB aa 32712 BB aa 32712
|
|
|
|
BB aa 32712 BB aa 32712 BB aa 32712 BB aa 32712 BB bb 32712
|
|
|
|
BB bb 32712 BB bb 32712 BB bb 32712 BB bb 32712 BB bb 32712
|
|
|
|
CC aa 29590 CC aa 29590 CC aa 29590 CC aa 29590 CC bb 29590
|
|
|
|
CC bb 29590 DD aa 25558 DD aa 25558 DD aa 25558 DD bb 25558
|
|
|
|
DD bb 25558 DD bb 25558 DD bb 25558 EE aa 23019 EE aa 23019
|
|
|
|
EE bb 23019 EE bb 23019 EE bb 23019 FF aa 17351 FF aa 17351
|
|
|
|
FF aa 17351 FF aa 17351 FF bb 17351 FF bb 17351 FF bb 17351
|
|
|
|
FF bb 17351 FF bb 17351 FF bb 17351 GG aa 12883 GG aa 12883
|
|
|
|
GG aa 12883 GG aa 12883 GG bb 12883 GG bb 12883 GG bb 12883
|
|
|
|
GG bb 12883 HH aa 7440 HH aa 7440 HH aa 7440 HH bb 7440
|
|
|
|
HH bb 7440 HH bb 7440 HH bb 7440 HH bb 7440 HH bb 7440 II aa 3800
|
|
|
|
II aa 3800 II bb 3800 II bb 3800 II bb 3800 II bb 3800 II bb 3800
|
|
|
|
JJ aa {} JJ aa {} JJ aa {} JJ aa {} JJ bb {} JJ bb {} JJ bb {}
|
|
|
|
JJ bb {}}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
|
|
|
do_execsql_test 1.19.7 {
|
|
|
|
SELECT a, b, sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW) FROM t3 ORDER BY 1, 2, 3;
|
2019-03-16 23:29:54 +03:00
|
|
|
} {AA aa 42430 AA aa 42430 AA aa 42430 AA aa 42430 AA bb 40052
|
|
|
|
AA bb 40052 AA bb 40052 AA bb 40052 BB aa 37179 BB aa 37179
|
|
|
|
BB aa 37179 BB aa 37179 BB aa 37179 BB aa 37179 BB bb 32712
|
|
|
|
BB bb 32712 BB bb 32712 BB bb 32712 BB bb 32712 BB bb 32712
|
|
|
|
CC aa 30758 CC aa 30758 CC aa 30758 CC aa 30758 CC bb 29590
|
|
|
|
CC bb 29590 DD aa 28265 DD aa 28265 DD aa 28265 DD bb 25558
|
|
|
|
DD bb 25558 DD bb 25558 DD bb 25558 EE aa 24668 EE aa 24668
|
|
|
|
EE bb 23019 EE bb 23019 EE bb 23019 FF aa 20856 FF aa 20856
|
|
|
|
FF aa 20856 FF aa 20856 FF bb 17351 FF bb 17351 FF bb 17351
|
|
|
|
FF bb 17351 FF bb 17351 FF bb 17351 GG aa 15754 GG aa 15754
|
|
|
|
GG aa 15754 GG aa 15754 GG bb 12883 GG bb 12883 GG bb 12883
|
|
|
|
GG bb 12883 HH aa 10634 HH aa 10634 HH aa 10634 HH bb 7440
|
|
|
|
HH bb 7440 HH bb 7440 HH bb 7440 HH bb 7440 HH bb 7440 II aa 6390
|
|
|
|
II aa 6390 II bb 3800 II bb 3800 II bb 3800 II bb 3800 II bb 3800
|
|
|
|
JJ aa 1786 JJ aa 1786 JJ aa 1786 JJ aa 1786 JJ bb {} JJ bb {}
|
|
|
|
JJ bb {} JJ bb {}}
|
2019-03-15 23:46:19 +03:00
|
|
|
|
2019-03-19 14:17:28 +03:00
|
|
|
do_execsql_test 1.19.8 {
|
|
|
|
SELECT a, b,
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING ),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW),
|
|
|
|
sum(c) OVER (ORDER BY a,b GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING )
|
|
|
|
FROM t3 ORDER BY 1, 2, 3;
|
|
|
|
} {AA aa 40052 40052 42430 42430 AA aa 40052 40052 42430 42430
|
|
|
|
AA aa 40052 40052 42430 42430 AA aa 40052 40052 42430 42430
|
|
|
|
AA bb 40052 40052 40052 40052 AA bb 40052 40052 40052 40052
|
|
|
|
AA bb 40052 40052 40052 40052 AA bb 40052 40052 40052 40052
|
|
|
|
BB aa 32712 32712 37179 37179 BB aa 32712 32712 37179 37179
|
|
|
|
BB aa 32712 32712 37179 37179 BB aa 32712 32712 37179 37179
|
|
|
|
BB aa 32712 32712 37179 37179 BB aa 32712 32712 37179 37179
|
|
|
|
BB bb 32712 32712 32712 32712 BB bb 32712 32712 32712 32712
|
|
|
|
BB bb 32712 32712 32712 32712 BB bb 32712 32712 32712 32712
|
|
|
|
BB bb 32712 32712 32712 32712 BB bb 32712 32712 32712 32712
|
|
|
|
CC aa 29590 29590 30758 30758 CC aa 29590 29590 30758 30758
|
|
|
|
CC aa 29590 29590 30758 30758 CC aa 29590 29590 30758 30758
|
|
|
|
CC bb 29590 29590 29590 29590 CC bb 29590 29590 29590 29590
|
|
|
|
DD aa 25558 25558 28265 28265 DD aa 25558 25558 28265 28265
|
|
|
|
DD aa 25558 25558 28265 28265 DD bb 25558 25558 25558 25558
|
|
|
|
DD bb 25558 25558 25558 25558 DD bb 25558 25558 25558 25558
|
|
|
|
DD bb 25558 25558 25558 25558 EE aa 23019 23019 24668 24668
|
|
|
|
EE aa 23019 23019 24668 24668 EE bb 23019 23019 23019 23019
|
|
|
|
EE bb 23019 23019 23019 23019 EE bb 23019 23019 23019 23019
|
|
|
|
FF aa 17351 17351 20856 20856 FF aa 17351 17351 20856 20856
|
|
|
|
FF aa 17351 17351 20856 20856 FF aa 17351 17351 20856 20856
|
|
|
|
FF bb 17351 17351 17351 17351 FF bb 17351 17351 17351 17351
|
|
|
|
FF bb 17351 17351 17351 17351 FF bb 17351 17351 17351 17351
|
|
|
|
FF bb 17351 17351 17351 17351 FF bb 17351 17351 17351 17351
|
|
|
|
GG aa 12883 12883 15754 15754 GG aa 12883 12883 15754 15754
|
|
|
|
GG aa 12883 12883 15754 15754 GG aa 12883 12883 15754 15754
|
|
|
|
GG bb 12883 12883 12883 12883 GG bb 12883 12883 12883 12883
|
|
|
|
GG bb 12883 12883 12883 12883 GG bb 12883 12883 12883 12883
|
|
|
|
HH aa 7440 7440 10634 10634 HH aa 7440 7440 10634 10634
|
|
|
|
HH aa 7440 7440 10634 10634 HH bb 7440 7440 7440 7440
|
|
|
|
HH bb 7440 7440 7440 7440 HH bb 7440 7440 7440 7440
|
|
|
|
HH bb 7440 7440 7440 7440 HH bb 7440 7440 7440 7440
|
|
|
|
HH bb 7440 7440 7440 7440 II aa 3800 3800 6390 6390
|
|
|
|
II aa 3800 3800 6390 6390 II bb 3800 3800 3800 3800
|
|
|
|
II bb 3800 3800 3800 3800 II bb 3800 3800 3800 3800
|
|
|
|
II bb 3800 3800 3800 3800 II bb 3800 3800 3800 3800
|
|
|
|
JJ aa {} {} 1786 1786 JJ aa {} {} 1786 1786 JJ aa {} {} 1786 1786
|
|
|
|
JJ aa {} {} 1786 1786 JJ bb {} {} {} {} JJ bb {} {} {} {}
|
|
|
|
JJ bb {} {} {} {} JJ bb {} {} {} {}}
|
|
|
|
|
2019-03-14 19:36:20 +03:00
|
|
|
do_execsql_test 2.1.1 {
|
|
|
|
SELECT row_number() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS (
|
|
|
|
ORDER BY c, b, a
|
|
|
|
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS
|
|
|
|
)
|
2019-03-16 23:29:54 +03:00
|
|
|
} {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 43 44 45 46 47
|
|
|
|
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
|
|
|
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
|
|
|
78 79 80}
|
2019-03-14 19:36:20 +03:00
|
|
|
|
|
|
|
do_execsql_test 2.1.2 {
|
|
|
|
SELECT nth_value(c, 14) OVER win
|
|
|
|
FROM t3
|
2019-03-15 23:46:19 +03:00
|
|
|
WINDOW win AS (
|
|
|
|
ORDER BY c, b, a
|
|
|
|
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS
|
|
|
|
)
|
2019-03-16 23:29:54 +03:00
|
|
|
} {247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247}
|
|
|
|
|
|
|
|
do_execsql_test 2.1.3 {
|
|
|
|
SELECT min(c) OVER win, max(c) OVER win, sum(c) OVER win FROM t3
|
|
|
|
WINDOW win AS (
|
|
|
|
ORDER BY c, b, a
|
|
|
|
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE NO OTHERS
|
|
|
|
) ORDER BY a, b, c;
|
|
|
|
} {102 223 1358 102 239 2293 102 911 38097 102 934 39960 102 309 4159
|
|
|
|
102 572 10643 102 627 13069 102 870 35417 102 247 2540 102 393 6608
|
|
|
|
102 399 7405 102 412 7817 102 660 16277 102 762 24077 102 633 14331
|
|
|
|
102 705 19673 102 711 20384 102 786 27176 102 792 28758
|
|
|
|
102 840 32858 102 158 767 102 430 8668 102 607 11824 102 759 23315
|
|
|
|
102 346 5506 102 822 31179 102 224 1582 102 256 3298 102 845 34547
|
|
|
|
102 238 2054 102 716 21100 102 794 29552 102 959 42795 102 113 215
|
|
|
|
102 777 26390 102 252 3042 102 629 13698 102 768 25613 102 208 1135
|
|
|
|
102 618 12442 102 667 16944 102 670 17614 102 102 102 102 295 3850
|
|
|
|
102 574 11217 102 726 21826 102 870 36287 102 938 40898 102 148 609
|
|
|
|
102 335 4824 102 480 9591 102 634 14965 102 160 927 102 844 33702
|
|
|
|
102 929 39026 102 938 41836 102 480 10071 102 790 27966
|
|
|
|
102 979 44737 102 133 461 102 330 4489 102 355 6215 102 683 18968
|
|
|
|
102 730 22556 102 963 43758 102 398 7006 102 652 15617 102 250 2790
|
|
|
|
102 421 8238 102 443 9111 102 671 18285 102 805 30357 102 113 328
|
|
|
|
102 234 1816 102 768 24845 102 899 37186 102 257 3555 102 336 5160
|
|
|
|
102 354 5860 102 839 32018}
|
2019-03-14 19:36:20 +03:00
|
|
|
|
|
|
|
do_execsql_test 2.2.1 {
|
|
|
|
SELECT row_number() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS (
|
|
|
|
ORDER BY c, b, a
|
|
|
|
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW
|
|
|
|
)
|
2019-03-16 23:29:54 +03:00
|
|
|
} {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 43 44 45 46 47
|
|
|
|
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
|
|
|
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
|
|
|
78 79 80}
|
2019-03-14 19:36:20 +03:00
|
|
|
|
|
|
|
do_execsql_test 2.2.2 {
|
|
|
|
SELECT nth_value(c, 14) OVER win
|
|
|
|
FROM t3
|
2019-03-15 23:46:19 +03:00
|
|
|
WINDOW win AS (
|
|
|
|
ORDER BY c, b, a
|
|
|
|
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW
|
|
|
|
)
|
2019-03-16 23:29:54 +03:00
|
|
|
} {250 250 250 250 250 250 250 250 250 250 250 250 250
|
|
|
|
250 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247}
|
|
|
|
|
|
|
|
do_execsql_test 2.2.3 {
|
|
|
|
SELECT min(c) OVER win, max(c) OVER win, sum(c) OVER win FROM t3
|
|
|
|
WINDOW win AS (
|
|
|
|
ORDER BY c, b, a
|
|
|
|
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE CURRENT ROW
|
|
|
|
) ORDER BY a, b, c;
|
|
|
|
} {102 208 1135 102 238 2054 102 899 37186 102 929 39026 102 295 3850
|
|
|
|
102 480 10071 102 618 12442 102 845 34547 102 239 2293 102 355 6215
|
|
|
|
102 398 7006 102 399 7405 102 652 15617 102 759 23315 102 629 13698
|
|
|
|
102 683 18968 102 705 19673 102 777 26390 102 790 27966
|
|
|
|
102 839 32018 102 148 609 102 421 8238 102 574 11217 102 730 22556
|
|
|
|
102 336 5160 102 805 30357 102 223 1358 102 252 3042 102 844 33702
|
|
|
|
102 234 1816 102 711 20384 102 792 28758 102 938 41836 102 102 102
|
|
|
|
102 768 25613 102 250 2790 102 627 13069 102 768 24845 102 160 927
|
|
|
|
102 607 11824 102 660 16277 102 667 16944 {} {} {} 102 257 3555
|
|
|
|
102 572 10643 102 716 21100 102 870 35417 102 934 39960 102 133 461
|
|
|
|
102 330 4489 102 443 9111 102 633 14331 102 158 767 102 840 32858
|
|
|
|
102 911 38097 102 938 40898 102 480 9591 102 786 27176
|
|
|
|
102 963 43758 102 113 328 102 309 4159 102 354 5860 102 671 18285
|
|
|
|
102 726 21826 102 959 42795 102 393 6608 102 634 14965 102 247 2540
|
|
|
|
102 412 7817 102 430 8668 102 670 17614 102 794 29552 102 113 215
|
|
|
|
102 224 1582 102 762 24077 102 870 36287 102 256 3298 102 335 4824
|
|
|
|
102 346 5506 102 822 31179}
|
2019-03-14 19:36:20 +03:00
|
|
|
|
|
|
|
do_execsql_test 2.3.1 {
|
|
|
|
SELECT row_number() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS (
|
|
|
|
ORDER BY c, b, a
|
|
|
|
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE GROUP
|
|
|
|
)
|
2019-03-16 23:29:54 +03:00
|
|
|
} {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 43 44 45 46 47
|
|
|
|
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
|
|
|
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
|
|
|
78 79 80}
|
2019-03-14 19:36:20 +03:00
|
|
|
|
|
|
|
do_execsql_test 2.3.2 {
|
|
|
|
SELECT nth_value(c, 14) OVER win
|
|
|
|
FROM t3
|
2019-03-15 23:46:19 +03:00
|
|
|
WINDOW win AS (
|
|
|
|
ORDER BY c, b, a
|
|
|
|
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE GROUP
|
|
|
|
)
|
2019-03-16 23:29:54 +03:00
|
|
|
} {250 250 250 250 250 250 250 250 250 250 250 250 250
|
|
|
|
250 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247}
|
|
|
|
|
|
|
|
do_execsql_test 2.3.3 {
|
|
|
|
SELECT min(c) OVER win, max(c) OVER win, sum(c) OVER win FROM t3
|
|
|
|
WINDOW win AS (
|
|
|
|
ORDER BY c, b, a
|
|
|
|
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE GROUP
|
|
|
|
) ORDER BY a, b, c;
|
|
|
|
} {102 208 1135 102 238 2054 102 899 37186 102 929 39026 102 295 3850
|
|
|
|
102 480 10071 102 618 12442 102 845 34547 102 239 2293 102 355 6215
|
|
|
|
102 398 7006 102 399 7405 102 652 15617 102 759 23315 102 629 13698
|
|
|
|
102 683 18968 102 705 19673 102 777 26390 102 790 27966
|
|
|
|
102 839 32018 102 148 609 102 421 8238 102 574 11217 102 730 22556
|
|
|
|
102 336 5160 102 805 30357 102 223 1358 102 252 3042 102 844 33702
|
|
|
|
102 234 1816 102 711 20384 102 792 28758 102 938 41836 102 102 102
|
|
|
|
102 768 25613 102 250 2790 102 627 13069 102 768 24845 102 160 927
|
|
|
|
102 607 11824 102 660 16277 102 667 16944 {} {} {} 102 257 3555
|
|
|
|
102 572 10643 102 716 21100 102 870 35417 102 934 39960 102 133 461
|
|
|
|
102 330 4489 102 443 9111 102 633 14331 102 158 767 102 840 32858
|
|
|
|
102 911 38097 102 938 40898 102 480 9591 102 786 27176
|
|
|
|
102 963 43758 102 113 328 102 309 4159 102 354 5860 102 671 18285
|
|
|
|
102 726 21826 102 959 42795 102 393 6608 102 634 14965 102 247 2540
|
|
|
|
102 412 7817 102 430 8668 102 670 17614 102 794 29552 102 113 215
|
|
|
|
102 224 1582 102 762 24077 102 870 36287 102 256 3298 102 335 4824
|
|
|
|
102 346 5506 102 822 31179}
|
2019-03-14 19:36:20 +03:00
|
|
|
|
|
|
|
do_execsql_test 2.4.1 {
|
|
|
|
SELECT row_number() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS (
|
|
|
|
ORDER BY c, b, a
|
|
|
|
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE TIES
|
|
|
|
)
|
2019-03-16 23:29:54 +03:00
|
|
|
} {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 43 44 45 46 47
|
|
|
|
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
|
|
|
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
|
|
|
78 79 80}
|
2019-03-14 19:36:20 +03:00
|
|
|
|
|
|
|
do_execsql_test 2.4.2 {
|
|
|
|
SELECT nth_value(c, 14) OVER win
|
|
|
|
FROM t3
|
2019-03-15 23:46:19 +03:00
|
|
|
WINDOW win AS (
|
|
|
|
ORDER BY c, b, a
|
|
|
|
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE TIES
|
|
|
|
)
|
2019-03-16 23:29:54 +03:00
|
|
|
} {247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247 247 247 247 247 247 247 247 247 247 247 247
|
|
|
|
247 247}
|
|
|
|
|
|
|
|
do_execsql_test 2.4.3 {
|
|
|
|
SELECT min(c) OVER win, max(c) OVER win, sum(c) OVER win FROM t3
|
|
|
|
WINDOW win AS (
|
|
|
|
ORDER BY c, b, a
|
|
|
|
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE TIES
|
|
|
|
) ORDER BY a, b, c;
|
|
|
|
} {102 223 1358 102 239 2293 102 911 38097 102 934 39960 102 309 4159
|
|
|
|
102 572 10643 102 627 13069 102 870 35417 102 247 2540 102 393 6608
|
|
|
|
102 399 7405 102 412 7817 102 660 16277 102 762 24077 102 633 14331
|
|
|
|
102 705 19673 102 711 20384 102 786 27176 102 792 28758
|
|
|
|
102 840 32858 102 158 767 102 430 8668 102 607 11824 102 759 23315
|
|
|
|
102 346 5506 102 822 31179 102 224 1582 102 256 3298 102 845 34547
|
|
|
|
102 238 2054 102 716 21100 102 794 29552 102 959 42795 102 113 215
|
|
|
|
102 777 26390 102 252 3042 102 629 13698 102 768 25613 102 208 1135
|
|
|
|
102 618 12442 102 667 16944 102 670 17614 102 102 102 102 295 3850
|
|
|
|
102 574 11217 102 726 21826 102 870 36287 102 938 40898 102 148 609
|
|
|
|
102 335 4824 102 480 9591 102 634 14965 102 160 927 102 844 33702
|
|
|
|
102 929 39026 102 938 41836 102 480 10071 102 790 27966
|
|
|
|
102 979 44737 102 133 461 102 330 4489 102 355 6215 102 683 18968
|
|
|
|
102 730 22556 102 963 43758 102 398 7006 102 652 15617 102 250 2790
|
|
|
|
102 421 8238 102 443 9111 102 671 18285 102 805 30357 102 113 328
|
|
|
|
102 234 1816 102 768 24845 102 899 37186 102 257 3555 102 336 5160
|
|
|
|
102 354 5860 102 839 32018}
|
2019-03-14 19:36:20 +03:00
|
|
|
|
2019-03-09 23:49:17 +03:00
|
|
|
#==========================================================================
|
|
|
|
|
2019-03-14 19:36:20 +03:00
|
|
|
do_execsql_test 3.0 {
|
2019-03-09 23:49:17 +03:00
|
|
|
DROP TABLE IF EXISTS t1;
|
2019-03-12 21:28:51 +03:00
|
|
|
CREATE TABLE t1(a REAL, b INTEGER);
|
2019-03-09 23:49:17 +03:00
|
|
|
INSERT INTO t1 VALUES
|
2019-03-11 14:12:34 +03:00
|
|
|
(5, 10), (10, 20), (13, 26), (13, 26),
|
|
|
|
(15, 30), (20, 40), (22,80), (30, 90);
|
2019-03-09 23:49:17 +03:00
|
|
|
} {}
|
|
|
|
|
2019-03-14 19:36:20 +03:00
|
|
|
do_execsql_test 3.1 {
|
2019-03-12 21:28:51 +03:00
|
|
|
SELECT CAST(a AS INTEGER), sum(b) OVER win FROM t1 WINDOW win AS ( ORDER BY a RANGE BETWEEN 5 PRECEDING AND 5 FOLLOWING )
|
2019-03-11 14:12:34 +03:00
|
|
|
} {5 30 10 112 13 102 13 102 15 142 20 150 22 120 30 90}
|
2019-03-09 23:49:17 +03:00
|
|
|
|
2019-03-14 19:36:20 +03:00
|
|
|
do_execsql_test 3.2 {
|
2019-03-12 21:28:51 +03:00
|
|
|
SELECT CAST(a AS INTEGER), sum(b) OVER win FROM t1 WINDOW win AS ( ORDER BY a RANGE BETWEEN 10 PRECEDING AND 5 PRECEDING )
|
2019-03-11 14:12:34 +03:00
|
|
|
} {5 {} 10 10 13 10 13 10 15 30 20 102 22 82 30 120}
|
2019-03-09 23:49:17 +03:00
|
|
|
|
2019-03-14 19:36:20 +03:00
|
|
|
do_execsql_test 3.3 {
|
2019-03-12 21:28:51 +03:00
|
|
|
SELECT CAST(a AS INTEGER), sum(b) OVER win FROM t1 WINDOW win AS ( ORDER BY a RANGE BETWEEN 2 FOLLOWING AND 3 FOLLOWING )
|
2019-03-11 14:12:34 +03:00
|
|
|
} {5 {} 10 52 13 30 13 30 15 {} 20 80 22 {} 30 {}}
|
|
|
|
|
2019-03-14 19:36:20 +03:00
|
|
|
do_execsql_test 3.4 {
|
2019-03-12 21:28:51 +03:00
|
|
|
SELECT CAST(a AS INTEGER), sum(b) OVER win FROM t1 WINDOW win AS ( ORDER BY a DESC RANGE BETWEEN 5 PRECEDING AND 5 FOLLOWING )
|
2019-03-11 14:12:34 +03:00
|
|
|
} {30 90 22 120 20 150 15 142 13 102 13 102 10 112 5 30}
|
|
|
|
|
2019-03-14 19:36:20 +03:00
|
|
|
do_execsql_test 3.5 {
|
2019-03-12 21:28:51 +03:00
|
|
|
SELECT CAST(a AS INTEGER), sum(b) OVER win FROM t1 WINDOW win AS ( ORDER BY a DESC RANGE BETWEEN 10 PRECEDING AND 5 PRECEDING )
|
2019-03-11 14:12:34 +03:00
|
|
|
} {30 {} 22 90 20 90 15 120 13 120 13 120 10 70 5 102}
|
|
|
|
|
2019-03-14 19:36:20 +03:00
|
|
|
do_execsql_test 3.6 {
|
2019-03-12 21:28:51 +03:00
|
|
|
SELECT CAST(a AS INTEGER), sum(b) OVER win FROM t1 WINDOW win AS ( ORDER BY a DESC RANGE BETWEEN 2 FOLLOWING AND 3 FOLLOWING )
|
2019-03-11 14:12:34 +03:00
|
|
|
} {30 {} 22 40 20 {} 15 52 13 20 13 20 10 {} 5 {}}
|
2019-03-09 23:49:17 +03:00
|
|
|
|
2019-03-14 19:36:20 +03:00
|
|
|
do_execsql_test 3.7 {
|
2019-03-12 21:28:51 +03:00
|
|
|
SELECT CAST(a AS INTEGER), sum(b) OVER win FROM t1 WINDOW win AS ( ORDER BY a RANGE BETWEEN 5.1 PRECEDING AND 5.3 FOLLOWING )
|
|
|
|
} {5 30 10 112 13 102 13 102 15 142 20 150 22 120 30 90}
|
|
|
|
|
2019-03-14 19:36:20 +03:00
|
|
|
do_execsql_test 3.8 {
|
2019-03-12 21:28:51 +03:00
|
|
|
SELECT CAST(a AS INTEGER), sum(b) OVER win FROM t1 WINDOW win AS ( ORDER BY a RANGE BETWEEN 10.2 PRECEDING AND 5.4 PRECEDING )
|
|
|
|
} {5 {} 10 {} 13 10 13 10 15 10 20 72 22 82 30 120}
|
|
|
|
|
2019-03-14 19:36:20 +03:00
|
|
|
do_execsql_test 3.9 {
|
2019-03-12 21:28:51 +03:00
|
|
|
SELECT CAST(a AS INTEGER), sum(b) OVER win FROM t1 WINDOW win AS ( ORDER BY a RANGE BETWEEN 2.6 FOLLOWING AND 3.5 FOLLOWING )
|
|
|
|
} {5 {} 10 52 13 {} 13 {} 15 {} 20 {} 22 {} 30 {}}
|
|
|
|
|
2019-03-14 19:36:20 +03:00
|
|
|
do_execsql_test 3.10 {
|
2019-03-12 21:28:51 +03:00
|
|
|
SELECT CAST(a AS INTEGER), sum(b) OVER win FROM t1 WINDOW win AS ( ORDER BY a DESC RANGE BETWEEN 5.7 PRECEDING AND 5.8 FOLLOWING )
|
|
|
|
} {30 90 22 120 20 150 15 142 13 102 13 102 10 112 5 30}
|
|
|
|
|
2019-03-14 19:36:20 +03:00
|
|
|
do_execsql_test 3.11 {
|
2019-03-12 21:28:51 +03:00
|
|
|
SELECT CAST(a AS INTEGER), sum(b) OVER win FROM t1 WINDOW win AS ( ORDER BY a DESC RANGE BETWEEN UNBOUNDED PRECEDING AND 5.9 PRECEDING )
|
|
|
|
} {30 {} 22 90 20 90 15 170 13 210 13 210 10 210 5 292}
|
|
|
|
|
2019-03-14 19:36:20 +03:00
|
|
|
do_execsql_test 3.12 {
|
2019-03-12 21:28:51 +03:00
|
|
|
SELECT CAST(a AS INTEGER), sum(b) OVER win FROM t1 WINDOW win AS ( ORDER BY a DESC RANGE BETWEEN 2.1 FOLLOWING AND UNBOUNDED FOLLOWING )
|
|
|
|
} {30 232 22 112 20 112 15 30 13 30 13 30 10 10 5 {}}
|
|
|
|
|
2019-03-19 20:45:31 +03:00
|
|
|
do_execsql_test 3.13 {
|
|
|
|
SELECT CAST(a AS INTEGER), sum(b) OVER win FROM t1 WINDOW win AS ( ORDER BY a RANGE 5.1 PRECEDING )
|
|
|
|
} {5 10 10 30 13 72 13 72 15 102 20 70 22 120 30 90}
|
|
|
|
|
2019-03-16 23:29:54 +03:00
|
|
|
#==========================================================================
|
|
|
|
|
|
|
|
do_execsql_test 4.0 {
|
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
CREATE TABLE t1(a INTEGER, b INTEGER);
|
|
|
|
INSERT INTO t1 VALUES
|
|
|
|
(NULL, 1), (NULL, 2), (NULL, 3), (10, 4), (10, 5);
|
|
|
|
} {}
|
|
|
|
|
2019-03-18 19:51:24 +03:00
|
|
|
do_execsql_test 4.1.1 {
|
2019-03-16 23:29:54 +03:00
|
|
|
SELECT sum(b) OVER (
|
|
|
|
ORDER BY a RANGE BETWEEN 5 PRECEDING AND 10 FOLLOWING
|
|
|
|
) FROM t1 ORDER BY 1;
|
|
|
|
} {6 6 6 9 9}
|
|
|
|
|
2019-03-18 19:51:24 +03:00
|
|
|
do_execsql_test 4.1.2 {
|
|
|
|
SELECT sum(b) OVER (
|
|
|
|
ORDER BY a DESC RANGE BETWEEN 5 PRECEDING AND 10 FOLLOWING
|
|
|
|
) FROM t1 ORDER BY 1;
|
|
|
|
} {6 6 6 9 9}
|
|
|
|
|
|
|
|
do_execsql_test 4.2.1 {
|
|
|
|
SELECT sum(b) OVER (
|
|
|
|
ORDER BY a RANGE BETWEEN 5 FOLLOWING AND 10 FOLLOWING
|
|
|
|
) FROM t1 ORDER BY 1 ;
|
|
|
|
} {{} {} 6 6 6}
|
|
|
|
|
|
|
|
do_execsql_test 4.2.2 {
|
|
|
|
SELECT sum(b) OVER (
|
|
|
|
ORDER BY a DESC RANGE BETWEEN 5 FOLLOWING AND 10 FOLLOWING
|
|
|
|
) FROM t1 ORDER BY 1 ;
|
|
|
|
} {{} {} 6 6 6}
|
|
|
|
|
|
|
|
do_execsql_test 4.3.1 {
|
|
|
|
SELECT sum(b) OVER (
|
|
|
|
ORDER BY a RANGE BETWEEN UNBOUNDED PRECEDING AND 10 FOLLOWING
|
|
|
|
) FROM t1 ORDER BY 1 ;
|
|
|
|
} {6 6 6 15 15}
|
|
|
|
|
|
|
|
do_execsql_test 4.4.1 {
|
|
|
|
SELECT sum(b) OVER (
|
|
|
|
ORDER BY a ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING
|
|
|
|
) FROM t1 ORDER BY 1 ;
|
|
|
|
} {3 6 9 9 12}
|
|
|
|
|
|
|
|
do_execsql_test 4.4.2 {
|
|
|
|
SELECT sum(b) OVER (
|
|
|
|
ORDER BY a DESC ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING
|
|
|
|
) FROM t1 ORDER BY 1 ;
|
|
|
|
} {5 6 8 9 10}
|
|
|
|
|
2019-03-19 22:19:53 +03:00
|
|
|
#==========================================================================
|
|
|
|
|
|
|
|
do_execsql_test 5.0 {
|
|
|
|
INSERT INTO t3 VALUES
|
|
|
|
(NULL, 'bb', 355), (NULL, 'cc', 158), (NULL, 'aa', 399),
|
|
|
|
('JJ', NULL, 839), ('FF', NULL, 618), ('BB', NULL, 393),
|
|
|
|
(NULL, 'bb', 629), (NULL, NULL, 667), (NULL, NULL, 870);
|
|
|
|
} {}
|
|
|
|
|
|
|
|
do_execsql_test 5.1.1.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102}
|
|
|
|
|
|
|
|
do_execsql_test 5.1.1.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1}
|
|
|
|
|
|
|
|
do_execsql_test 5.1.2.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY a
|
|
|
|
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {899 113 899 113 899 113 899 113 899 113 899 113 899 113
|
|
|
|
899 113 899 113 899 113 899 113 899 113 899 113 899 113
|
|
|
|
899 113 899 113 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 113 979 113 979 113 979 113 979 113
|
|
|
|
979 113 979 113 979 113 979 113 979 113 979 113 979 113
|
|
|
|
979 113 979 113 979 113 979 113 979 113}
|
|
|
|
|
|
|
|
do_execsql_test 5.1.2.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY a
|
|
|
|
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {2947 81 2947 81 2947 81 2947 81 2947 81 2947 81 2947 81
|
|
|
|
2947 81 2947 81 5287 74 5287 74 5287 74 5287 74 5287 74
|
|
|
|
5287 74 5287 74 8400 65 8400 65 8400 65 8400 65 8400 65
|
|
|
|
8400 65 8400 65 8400 65 8400 65 9664 57 9664 57 9664 57
|
|
|
|
9664 57 9664 57 9664 57 9664 57 9664 57 10626 46 10626 46
|
|
|
|
10626 46 10626 46 10626 46 10626 46 10626 46 10626 46 10626 46
|
|
|
|
10626 46 10626 46 12145 41 12145 41 12145 41 12145 41 12145 41
|
|
|
|
13949 34 13949 34 13949 34 13949 34 13949 34 13949 34 13949 34
|
|
|
|
15315 28 15315 28 15315 28 15315 28 15315 28 15315 28 18796 15
|
|
|
|
18796 15 18796 15 18796 15 18796 15 18796 15 18796 15 18796 15
|
|
|
|
18796 15 18796 15 18796 15 18796 15 18796 15 21105 7 21105 7
|
|
|
|
21105 7 21105 7 21105 7 21105 7 21105 7 21105 7 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1}
|
|
|
|
|
|
|
|
do_execsql_test 5.1.3.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( PARTITION BY coalesce(a, '')
|
|
|
|
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {777 113 777 113 777 113 777 113 777 113 805 250 805 250
|
|
|
|
805 250 805 250 805 250 805 250 805 250 822 158 822 158
|
|
|
|
822 158 822 158 822 158 822 158 840 247 840 247 840 247
|
|
|
|
840 247 840 247 840 247 840 247 840 247 840 247 840 247
|
|
|
|
840 247 840 247 840 247 870 158 870 158 870 158 870 158
|
|
|
|
870 158 870 158 899 113 899 113 899 113 899 113 899 113
|
|
|
|
899 113 899 113 899 113 899 113 934 223 934 223 934 223
|
|
|
|
934 223 934 223 934 223 934 223 934 223 938 102 938 102
|
|
|
|
938 102 938 102 938 102 938 102 938 102 938 102 938 102
|
|
|
|
938 102 938 102 938 148 938 148 938 148 938 148 938 148
|
|
|
|
938 148 938 148 938 148 959 224 959 224 959 224 959 224
|
|
|
|
959 224 959 224 959 224 979 133 979 133 979 133 979 133
|
|
|
|
979 133 979 133 979 133 979 133 979 133}
|
|
|
|
|
|
|
|
do_execsql_test 5.1.3.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( PARTITION BY coalesce(a, '')
|
|
|
|
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {962 1 962 1 962 1 962 1 962 1 962 1 962 1 962 1 962 1
|
|
|
|
962 1 962 1 1264 1 1264 1 1264 1 1264 1 1264 1 1264 1
|
|
|
|
1264 1 1264 1 1366 1 1366 1 1366 1 1366 1 1366 1 1366 1
|
|
|
|
1519 1 1519 1 1519 1 1519 1 1519 1 1804 1 1804 1 1804 1
|
|
|
|
1804 1 1804 1 1804 1 1804 1 2050 1 2050 1 2050 1 2050 1
|
|
|
|
2050 1 2050 1 2309 1 2309 1 2309 1 2309 1 2309 1 2309 1
|
|
|
|
2309 1 2309 1 2340 1 2340 1 2340 1 2340 1 2340 1 2340 1
|
|
|
|
2340 1 2947 1 2947 1 2947 1 2947 1 2947 1 2947 1 2947 1
|
|
|
|
2947 1 2947 1 3113 1 3113 1 3113 1 3113 1 3113 1 3113 1
|
|
|
|
3113 1 3113 1 3113 1 3481 1 3481 1 3481 1 3481 1 3481 1
|
|
|
|
3481 1 3481 1 3481 1 3481 1 3481 1 3481 1 3481 1 3481 1}
|
|
|
|
|
|
|
|
do_execsql_test 5.1.4.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY a GROUPS 6 PRECEDING EXCLUDE NO OTHERS )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {870 158 870 158 870 158 870 158 870 158 870 158 934 158
|
|
|
|
934 158 934 158 934 158 934 158 934 158 934 158 934 158
|
|
|
|
934 158 934 158 934 158 934 158 934 158 934 158 934 158
|
|
|
|
934 158 934 158 934 158 934 158 934 158 934 158 934 158
|
|
|
|
934 158 934 158 934 158 934 158 934 158 959 102 959 102
|
|
|
|
959 102 959 102 959 102 959 102 959 102 959 102 959 102
|
|
|
|
959 102 959 102 959 102 959 102 959 102 959 102 959 102
|
|
|
|
959 102 959 102 959 102 959 113 959 113 959 113 959 113
|
|
|
|
959 113 959 158 959 158 959 158 959 158 959 158 959 158
|
|
|
|
959 158 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102}
|
|
|
|
|
|
|
|
do_execsql_test 5.1.4.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY a GROUPS 6 PRECEDING EXCLUDE NO OTHERS )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {2050 1 2050 1 2050 1 2050 1 2050 1 2050 1 4359 7 4359 7
|
|
|
|
4359 7 4359 7 4359 7 4359 7 4359 7 4359 7 7840 15 7840 15
|
|
|
|
7840 15 7840 15 7840 15 7840 15 7840 15 7840 15 7840 15
|
|
|
|
7840 15 7840 15 7840 15 7840 15 9206 28 9206 28 9206 28
|
|
|
|
9206 28 9206 28 9206 28 11010 34 11010 34 11010 34 11010 34
|
|
|
|
11010 34 11010 34 11010 34 12368 74 12368 74 12368 74 12368 74
|
|
|
|
12368 74 12368 74 12368 74 12529 41 12529 41 12529 41 12529 41
|
|
|
|
12529 41 12705 57 12705 57 12705 57 12705 57 12705 57 12705 57
|
|
|
|
12705 57 12705 57 13491 46 13491 46 13491 46 13491 46 13491 46
|
|
|
|
13491 46 13491 46 13491 46 13491 46 13491 46 13491 46 13509 65
|
|
|
|
13509 65 13509 65 13509 65 13509 65 13509 65 13509 65 13509 65
|
|
|
|
13509 65 13949 81 13949 81 13949 81 13949 81 13949 81 13949 81
|
|
|
|
13949 81 13949 81 13949 81}
|
|
|
|
|
|
|
|
do_execsql_test 5.1.5.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY c RANGE BETWEEN 6 PRECEDING AND 7 FOLLOWING EXCLUDE NO OTHERS )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {102 102 113 113 113 113 133 133 148 148 160 158 160 158
|
|
|
|
160 158 208 208 224 223 224 223 239 234 239 234 239 234
|
|
|
|
252 247 257 247 257 247 257 250 257 252 295 295 309 309
|
|
|
|
336 330 336 330 336 330 346 346 355 354 355 354 355 354
|
|
|
|
399 393 399 393 399 393 399 393 399 393 412 412 421 421
|
|
|
|
430 430 443 443 480 480 480 480 574 572 574 572 607 607
|
|
|
|
618 618 618 618 634 627 634 627 634 627 634 627 634 629
|
|
|
|
652 652 667 660 671 667 671 667 671 667 671 667 683 683
|
|
|
|
711 705 716 705 716 711 730 726 730 726 762 759 768 759
|
|
|
|
768 762 768 762 777 777 792 786 794 786 794 786 794 790
|
|
|
|
805 805 822 822 845 839 845 839 845 839 845 839 845 839
|
|
|
|
870 870 870 870 870 870 899 899 911 911 934 929 938 929
|
|
|
|
938 934 938 934 963 959 963 959 979 979}
|
|
|
|
|
|
|
|
do_execsql_test 5.1.5.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY c RANGE BETWEEN 6 PRECEDING AND 7 FOLLOWING EXCLUDE NO OTHERS )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} 1 {} 5 {} 6 {} 6 {} 8 {} 9 {} 25 {} 34 {} 36 {} 38
|
|
|
|
{} 38 {} 40 {} 41 {} 43 {} 43 {} 50 {} 60 {} 61 {} 64
|
|
|
|
{} 64 {} 67 {} 68 {} 69 {} 70 {} 72 {} 78 {} 78 {} 78
|
|
|
|
{} 85 {} 85 133 4 223 10 223 11 226 2 226 2 239 12 239 13
|
|
|
|
239 14 247 15 257 18 257 19 295 20 309 21 335 22 335 23
|
|
|
|
335 24 421 35 443 37 504 16 504 17 607 42 683 56 710 26
|
|
|
|
710 27 710 27 711 59 759 62 759 63 777 66 805 71 899 81
|
|
|
|
911 82 929 83 929 84 979 89 1334 51 1416 57 1416 58 1584 29
|
|
|
|
1584 29 1584 31 1584 32 1584 32 1891 49 1922 87 1922 88
|
|
|
|
2005 52 2005 52 2005 54 2005 55 2518 45 2518 46 2518 46
|
|
|
|
2518 48 2523 73 2523 73 2523 75 2523 76 2523 77}
|
|
|
|
|
|
|
|
do_execsql_test 5.2.1.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {963 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 113}
|
|
|
|
|
|
|
|
do_execsql_test 5.2.1.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {22176 1 22192 1 22196 1 22226 1 22244 1 22256 1 22310 1
|
|
|
|
22316 1 22316 1 22350 1 22378 1 22396 1 22444 1 22450 1
|
|
|
|
22472 1 22484 1 22488 1 22488 1 22522 1 22526 1 22526 1
|
|
|
|
22528 1 22548 1 22712 1 22734 1 22756 1 22756 1 22762 1
|
|
|
|
22762 1 22800 1 22800 1 22820 1 22846 1 22860 1 22898 1
|
|
|
|
22908 1 22916 1 22932 1 23022 1 23042 1 23042 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1 23155 1 23155 1
|
|
|
|
23155 1 23155 1 23155 1 23155 1 23155 1}
|
|
|
|
|
|
|
|
do_execsql_test 5.2.2.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY a
|
|
|
|
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {839 113 899 113 899 113 899 113 899 113 899 113 899 113
|
|
|
|
899 113 899 113 899 113 899 113 899 113 899 113 899 113
|
|
|
|
899 113 899 234 963 113 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 113 979 113 979 113 979 113 979 113
|
|
|
|
979 113 979 113 979 113 979 113 979 113 979 113 979 113
|
|
|
|
979 113 979 113 979 113 979 113 979 113}
|
|
|
|
|
|
|
|
do_execsql_test 5.2.2.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY a
|
|
|
|
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {2048 81 2108 81 2108 81 2690 81 2834 81 2947 81 2947 81
|
|
|
|
2947 81 2947 81 4482 74 4616 74 4844 74 4866 74 5287 74
|
|
|
|
5287 74 5287 74 7421 65 7437 65 7717 65 8045 65 8267 65
|
|
|
|
8400 65 8400 65 8400 65 8400 65 8735 57 9329 57 9664 57
|
|
|
|
9664 57 9664 57 9664 57 9664 57 9664 57 9959 46 10331 46
|
|
|
|
10626 46 10626 46 10626 46 10626 46 10626 46 10626 46 10626 46
|
|
|
|
10626 46 10626 46 11368 41 11516 41 12032 41 12145 41 12145 41
|
|
|
|
12990 34 13104 34 13949 34 13949 34 13949 34 13949 34 13949 34
|
|
|
|
14556 28 14708 28 15315 28 15315 28 15315 28 15315 28 18085 15
|
|
|
|
18091 15 18163 15 18397 15 18403 15 18403 15 18549 15 18796 15
|
|
|
|
18796 15 18796 15 18796 15 18796 15 18796 15 20194 7 20478 7
|
|
|
|
20796 7 20866 7 20882 7 21105 7 21105 7 21105 7 22488 1
|
|
|
|
22526 1 22756 1 22800 1 23155 1 23155 1}
|
|
|
|
|
|
|
|
do_execsql_test 5.2.3.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( PARTITION BY coalesce(a, '')
|
|
|
|
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {667 158 671 250 759 158 768 113 777 113 777 113 777 113
|
|
|
|
777 252 792 247 805 250 805 250 805 250 805 250 805 250
|
|
|
|
805 398 822 158 822 158 822 158 822 158 822 346 839 113
|
|
|
|
840 247 840 247 840 247 840 247 840 247 840 247 840 247
|
|
|
|
840 247 840 247 840 247 840 247 840 393 845 224 870 102
|
|
|
|
870 158 870 158 870 158 870 158 870 355 899 113 899 113
|
|
|
|
899 113 899 113 899 113 899 113 899 113 899 234 911 223
|
|
|
|
929 148 934 223 934 223 934 223 934 223 934 223 934 223
|
|
|
|
934 239 938 102 938 102 938 102 938 102 938 102 938 102
|
|
|
|
938 102 938 102 938 102 938 148 938 148 938 148 938 148
|
|
|
|
938 148 938 148 938 160 938 208 959 224 959 224 959 224
|
|
|
|
959 224 959 224 959 238 963 133 979 133 979 133 979 133
|
|
|
|
979 133 979 133 979 133 979 133 979 330}
|
|
|
|
|
|
|
|
do_execsql_test 5.2.3.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( PARTITION BY coalesce(a, '')
|
|
|
|
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {295 1 335 1 607 1 667 1 742 1 759 1 845 1 890 1 929 1
|
|
|
|
959 1 962 1 962 1 962 1 962 1 962 1 962 1 962 1 962 1
|
|
|
|
962 1 1264 1 1264 1 1264 1 1264 1 1264 1 1264 1 1366 1
|
|
|
|
1366 1 1366 1 1366 1 1383 1 1398 1 1406 1 1421 1 1519 1
|
|
|
|
1519 1 1535 1 1651 1 1669 1 1682 1 1695 1 1804 1 1804 1
|
|
|
|
1804 1 1804 1 1804 1 1897 1 1919 1 2000 1 2048 1 2050 1
|
|
|
|
2050 1 2070 1 2086 1 2108 1 2108 1 2134 1 2150 1 2309 1
|
|
|
|
2309 1 2309 1 2340 1 2340 1 2340 1 2430 1 2690 1 2758 1
|
|
|
|
2770 1 2776 1 2834 1 2848 1 2947 1 2947 1 2947 1 2947 1
|
|
|
|
2980 1 3082 1 3088 1 3088 1 3113 1 3113 1 3113 1 3113 1
|
|
|
|
3234 1 3481 1 3481 1 3481 1 3481 1 3481 1 3481 1}
|
|
|
|
|
|
|
|
do_execsql_test 5.2.4.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY a GROUPS 6 PRECEDING EXCLUDE CURRENT ROW )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {667 158 870 158 870 158 870 158 870 158 870 355 911 158
|
|
|
|
934 158 934 158 934 158 934 158 934 158 934 158 934 158
|
|
|
|
934 158 934 158 934 158 934 158 934 158 934 158 934 158
|
|
|
|
934 158 934 158 934 158 934 158 934 158 934 158 934 158
|
|
|
|
934 158 934 158 934 158 934 158 934 158 934 158 959 102
|
|
|
|
959 102 959 102 959 102 959 102 959 102 959 102 959 102
|
|
|
|
959 102 959 102 959 102 959 102 959 102 959 102 959 102
|
|
|
|
959 102 959 102 959 102 959 113 959 113 959 113 959 113
|
|
|
|
959 113 959 158 959 158 959 158 959 158 959 158 959 158
|
|
|
|
959 158 963 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102}
|
|
|
|
|
|
|
|
do_execsql_test 5.2.4.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY a GROUPS 6 PRECEDING EXCLUDE CURRENT ROW )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {1383 1 1421 1 1651 1 1695 1 2050 1 2050 1 3448 7 3732 7
|
|
|
|
4050 7 4120 7 4136 7 4359 7 4359 7 4359 7 7129 15 7135 15
|
|
|
|
7207 15 7441 15 7447 15 7447 15 7593 15 7840 15 7840 15
|
|
|
|
7840 15 7840 15 7840 15 7840 15 8447 28 8599 28 9206 28
|
|
|
|
9206 28 9206 28 9206 28 10051 34 10165 34 11010 34 11010 34
|
|
|
|
11010 34 11010 34 11010 34 11563 74 11697 74 11752 41 11776 57
|
|
|
|
11900 41 11925 74 11947 74 12368 74 12368 74 12368 74 12370 57
|
|
|
|
12416 41 12529 41 12529 41 12530 65 12546 65 12705 57 12705 57
|
|
|
|
12705 57 12705 57 12705 57 12705 57 12824 46 12826 65 13050 81
|
|
|
|
13110 81 13110 81 13154 65 13196 46 13376 65 13491 46 13491 46
|
|
|
|
13491 46 13491 46 13491 46 13491 46 13491 46 13491 46 13491 46
|
|
|
|
13509 65 13509 65 13509 65 13509 65 13692 81 13836 81 13949 81
|
|
|
|
13949 81 13949 81 13949 81}
|
|
|
|
|
|
|
|
do_execsql_test 5.2.5.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY c RANGE BETWEEN 6 PRECEDING AND 7 FOLLOWING EXCLUDE CURRENT ROW )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} 113 113 113 113 158 158 160 158 160 158 223 223
|
|
|
|
224 224 238 234 239 234 239 238 252 250 256 252 257 247
|
|
|
|
257 247 257 250 335 330 336 330 336 335 355 354 355 354
|
|
|
|
355 355 399 393 399 393 399 393 399 393 399 393 480 480
|
|
|
|
480 480 572 572 574 574 618 618 618 618 633 629 634 627
|
|
|
|
634 627 634 627 634 629 667 667 670 667 671 667 671 667
|
|
|
|
671 667 711 711 711 711 716 705 726 726 730 730 762 762
|
|
|
|
768 759 768 762 768 762 792 790 792 790 794 786 794 786
|
|
|
|
844 839 845 839 845 839 845 839 845 839 870 870 870 870
|
|
|
|
870 870 934 934 938 929 938 934 938 934 959 959 963 963}
|
|
|
|
|
|
|
|
do_execsql_test 5.2.5.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY c RANGE BETWEEN 6 PRECEDING AND 7 FOLLOWING EXCLUDE CURRENT ROW )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} 1 {} 4 {} 5 {} 6 {} 6 {} 8 {} 9 {} 10 {} 14 {} 15
|
|
|
|
{} 19 {} 20 {} 21 {} 23 {} 25 {} 34 {} 35 {} 36 {} 37
|
|
|
|
{} 38 {} 38 {} 40 {} 41 {} 42 {} 43 {} 43 {} 50 {} 56
|
|
|
|
{} 60 {} 61 {} 62 {} 64 {} 64 {} 66 {} 67 {} 68 {} 69
|
|
|
|
{} 70 {} 71 {} 72 {} 78 {} 78 {} 78 {} 81 {} 82 {} 83
|
|
|
|
{} 85 {} 85 {} 89 113 2 113 2 223 11 239 12 239 13 257 18
|
|
|
|
335 22 335 24 355 27 355 27 504 16 504 17 705 58 710 26
|
|
|
|
711 57 711 59 759 63 929 84 959 88 963 87 1185 32 1185 32
|
|
|
|
1191 29 1191 29 1334 51 1334 55 1338 52 1338 52 1584 31
|
|
|
|
1678 77 1684 73 1684 73 1885 48 1889 46 1889 46 1891 45
|
|
|
|
1891 49 2005 54 2523 75 2523 76}
|
|
|
|
|
|
|
|
do_execsql_test 5.3.1.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}}
|
|
|
|
|
|
|
|
do_execsql_test 5.3.1.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1}
|
|
|
|
|
|
|
|
do_execsql_test 5.3.2.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY a
|
|
|
|
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
899 113 899 113 899 113 899 113 899 113 899 113 899 113
|
|
|
|
899 113 899 113 899 113 899 113 899 113 899 113 899 113
|
|
|
|
899 113 899 113 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 113 979 113
|
|
|
|
979 113 979 113 979 113 979 113 979 113 979 113 979 113
|
|
|
|
979 113 979 113 979 113 979 113 979 113 979 113 979 113
|
|
|
|
979 113 979 113 979 113}
|
|
|
|
|
|
|
|
do_execsql_test 5.3.2.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY a
|
|
|
|
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} 81 {} 81 {} 81 {} 81 {} 81 {} 81 {} 81 {} 81 {} 81
|
|
|
|
2947 74 2947 74 2947 74 2947 74 2947 74 2947 74 2947 74
|
|
|
|
5287 65 5287 65 5287 65 5287 65 5287 65 5287 65 5287 65
|
|
|
|
5287 65 5287 65 8400 57 8400 57 8400 57 8400 57 8400 57
|
|
|
|
8400 57 8400 57 8400 57 9664 46 9664 46 9664 46 9664 46
|
|
|
|
9664 46 9664 46 9664 46 9664 46 9664 46 9664 46 9664 46
|
|
|
|
10626 41 10626 41 10626 41 10626 41 10626 41 12145 34 12145 34
|
|
|
|
12145 34 12145 34 12145 34 12145 34 12145 34 13949 28 13949 28
|
|
|
|
13949 28 13949 28 13949 28 13949 28 15315 15 15315 15 15315 15
|
|
|
|
15315 15 15315 15 15315 15 15315 15 15315 15 15315 15 15315 15
|
|
|
|
15315 15 15315 15 15315 15 18796 7 18796 7 18796 7 18796 7
|
|
|
|
18796 7 18796 7 18796 7 18796 7 21105 1 21105 1 21105 1
|
|
|
|
21105 1 21105 1 21105 1}
|
|
|
|
|
|
|
|
do_execsql_test 5.3.3.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( PARTITION BY coalesce(a, '')
|
|
|
|
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}}
|
|
|
|
|
|
|
|
do_execsql_test 5.3.3.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( PARTITION BY coalesce(a, '')
|
|
|
|
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1}
|
|
|
|
|
|
|
|
do_execsql_test 5.3.4.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY a GROUPS 6 PRECEDING EXCLUDE GROUP )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} {} {} {} {} {} {} {} {} {} {} {} 870 158 870 158 870 158
|
|
|
|
870 158 870 158 870 158 870 158 870 158 934 158 934 158
|
|
|
|
934 158 934 158 934 158 934 158 934 158 934 158 934 158
|
|
|
|
934 158 934 158 934 158 934 158 934 158 934 158 934 158
|
|
|
|
934 158 934 158 934 158 934 158 934 158 934 158 934 158
|
|
|
|
934 158 934 158 934 158 959 102 959 102 959 102 959 102
|
|
|
|
959 102 959 102 959 102 959 102 959 102 959 102 959 102
|
|
|
|
959 102 959 102 959 102 959 102 959 102 959 102 959 113
|
|
|
|
959 113 959 113 959 113 959 113 959 113 959 113 959 113
|
|
|
|
959 113 959 113 959 113 959 158 959 158 959 158 959 158
|
|
|
|
959 158 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102}
|
|
|
|
|
|
|
|
do_execsql_test 5.3.4.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY a GROUPS 6 PRECEDING EXCLUDE GROUP )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 2050 7 2050 7 2050 7 2050 7
|
|
|
|
2050 7 2050 7 2050 7 2050 7 4359 15 4359 15 4359 15 4359 15
|
|
|
|
4359 15 4359 15 4359 15 4359 15 4359 15 4359 15 4359 15
|
|
|
|
4359 15 4359 15 7840 28 7840 28 7840 28 7840 28 7840 28
|
|
|
|
7840 28 9206 34 9206 34 9206 34 9206 34 9206 34 9206 34
|
|
|
|
9206 34 10028 74 10028 74 10028 74 10028 74 10028 74 10028 74
|
|
|
|
10028 74 10396 65 10396 65 10396 65 10396 65 10396 65 10396 65
|
|
|
|
10396 65 10396 65 10396 65 11002 81 11002 81 11002 81 11002 81
|
|
|
|
11002 81 11002 81 11002 81 11002 81 11002 81 11010 41 11010 41
|
|
|
|
11010 41 11010 41 11010 41 11441 57 11441 57 11441 57 11441 57
|
|
|
|
11441 57 11441 57 11441 57 11441 57 12529 46 12529 46 12529 46
|
|
|
|
12529 46 12529 46 12529 46 12529 46 12529 46 12529 46 12529 46
|
|
|
|
12529 46}
|
|
|
|
|
|
|
|
do_execsql_test 5.3.5.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY c RANGE BETWEEN 6 PRECEDING AND 7 FOLLOWING EXCLUDE GROUP )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
|
|
|
|
{} {} {} {} 158 158 160 160 160 160 223 223 224 224 238 234
|
|
|
|
239 234 239 238 252 250 256 252 257 247 257 247 257 250
|
|
|
|
335 330 336 330 336 335 354 354 354 354 355 355 398 393
|
|
|
|
398 393 399 393 399 398 399 398 572 572 574 574 633 629
|
|
|
|
634 627 634 627 634 627 634 629 667 667 670 667 671 667
|
|
|
|
671 670 671 670 711 711 711 711 716 705 726 726 730 730
|
|
|
|
762 762 762 762 762 762 768 759 792 790 792 790 794 786
|
|
|
|
794 786 844 839 845 839 845 839 845 840 845 840 934 934
|
|
|
|
934 934 934 934 938 929 959 959 963 963}
|
|
|
|
|
|
|
|
do_execsql_test 5.3.5.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY c RANGE BETWEEN 6 PRECEDING AND 7 FOLLOWING EXCLUDE GROUP )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} 1 {} 2 {} 2 {} 4 {} 5 {} 6 {} 6 {} 8 {} 9 {} 10
|
|
|
|
{} 14 {} 15 {} 19 {} 20 {} 21 {} 23 {} 25 {} 27 {} 27
|
|
|
|
{} 34 {} 35 {} 36 {} 37 {} 38 {} 38 {} 40 {} 41 {} 42
|
|
|
|
{} 43 {} 43 {} 50 {} 56 {} 60 {} 61 {} 62 {} 64 {} 64
|
|
|
|
{} 66 {} 67 {} 68 {} 69 {} 70 {} 71 {} 72 {} 78 {} 78
|
|
|
|
{} 78 {} 81 {} 82 {} 83 {} 85 {} 85 {} 89 223 11 239 12
|
|
|
|
239 13 257 18 335 22 335 24 504 16 504 17 671 52 671 52
|
|
|
|
705 58 710 26 711 57 711 59 759 63 786 32 786 32 798 29
|
|
|
|
798 29 845 73 845 73 929 84 959 88 963 87 1260 46 1260 46
|
|
|
|
1334 51 1334 55 1584 31 1678 77 1885 48 1891 45 1891 49
|
|
|
|
2005 54 2523 75 2523 76}
|
|
|
|
|
|
|
|
do_execsql_test 5.4.1.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE TIES )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {102 102 113 113 113 113 133 133 148 148 158 158 158 158
|
|
|
|
160 160 208 208 223 223 224 224 234 234 238 238 239 239
|
|
|
|
247 247 250 250 252 252 256 256 257 257 295 295 309 309
|
|
|
|
330 330 335 335 336 336 346 346 354 354 355 355 355 355
|
|
|
|
393 393 393 393 398 398 399 399 399 399 412 412 421 421
|
|
|
|
430 430 443 443 480 480 480 480 572 572 574 574 607 607
|
|
|
|
618 618 618 618 627 627 629 629 629 629 633 633 634 634
|
|
|
|
652 652 660 660 667 667 667 667 670 670 671 671 683 683
|
|
|
|
705 705 711 711 716 716 726 726 730 730 759 759 762 762
|
|
|
|
768 768 768 768 777 777 786 786 790 790 792 792 794 794
|
|
|
|
805 805 822 822 839 839 839 839 840 840 844 844 845 845
|
|
|
|
870 870 870 870 870 870 899 899 911 911 929 929 934 934
|
|
|
|
938 938 938 938 959 959 963 963 979 979}
|
|
|
|
|
|
|
|
do_execsql_test 5.4.1.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE TIES )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 113 1 113 1 133 1 223 1 239 1 247 1
|
|
|
|
257 1 295 1 309 1 335 1 355 1 355 1 393 1 393 1 399 1
|
|
|
|
399 1 421 1 443 1 607 1 627 1 629 1 629 1 633 1 667 1
|
|
|
|
667 1 671 1 683 1 705 1 711 1 759 1 777 1 805 1 839 1
|
|
|
|
839 1 845 1 899 1 911 1 929 1 959 1 963 1 979 1}
|
|
|
|
|
|
|
|
do_execsql_test 5.4.2.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY a
|
|
|
|
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE TIES )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {113 113 234 234 257 257 336 336 354 354 768 768 839 839
|
|
|
|
839 839 899 113 899 113 899 113 899 113 899 113 899 113
|
|
|
|
899 113 899 113 899 113 899 113 899 113 899 113 899 113
|
|
|
|
899 113 899 899 963 113 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 113 979 113 979 113 979 113 979 113 979 113 979 113
|
|
|
|
979 113 979 113 979 113 979 113 979 113 979 113 979 113
|
|
|
|
979 113 979 113 979 113 979 113 979 113}
|
|
|
|
|
|
|
|
do_execsql_test 5.4.2.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY a
|
|
|
|
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE TIES )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} 81 {} 81 {} 81 {} 81 113 81 257 81 839 81 839 81 899 81
|
|
|
|
2947 74 2947 74 2947 74 3368 74 3390 74 3618 74 3752 74
|
|
|
|
5287 65 5287 65 5287 65 5287 65 5420 65 5642 65 5970 65
|
|
|
|
6250 65 6266 65 8400 57 8400 57 8400 57 8400 57 8400 57
|
|
|
|
8400 57 8735 57 9329 57 9664 46 9664 46 9664 46 9664 46
|
|
|
|
9664 46 9664 46 9664 46 9664 46 9664 46 9959 46 10331 46
|
|
|
|
10626 41 10626 41 10739 41 11255 41 11403 41 12145 34 12145 34
|
|
|
|
12145 34 12145 34 12145 34 12990 34 13104 34 13949 28 13949 28
|
|
|
|
13949 28 13949 28 14556 28 14708 28 15315 15 15315 15 15315 15
|
|
|
|
15315 15 15315 15 15315 15 15562 15 15708 15 15708 15 15714 15
|
|
|
|
15948 15 16020 15 16026 15 18796 7 18796 7 18796 7 19019 7
|
|
|
|
19035 7 19105 7 19423 7 19707 7 21105 1 21105 1 21460 1
|
|
|
|
21504 1 21734 1 21772 1}
|
|
|
|
|
|
|
|
do_execsql_test 5.4.3.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( PARTITION BY coalesce(a, '')
|
|
|
|
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE TIES )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {102 102 113 113 113 113 133 133 148 148 158 158 158 158
|
|
|
|
160 160 208 208 223 223 224 224 234 234 238 238 239 239
|
|
|
|
247 247 250 250 252 252 256 256 257 257 295 295 309 309
|
|
|
|
330 330 335 335 336 336 346 346 354 354 355 355 355 355
|
|
|
|
393 393 393 393 398 398 399 399 399 399 412 412 421 421
|
|
|
|
430 430 443 443 480 480 480 480 572 572 574 574 607 607
|
|
|
|
618 618 618 618 627 627 629 629 629 629 633 633 634 634
|
|
|
|
652 652 660 660 667 667 667 667 670 670 671 671 683 683
|
|
|
|
705 705 711 711 716 716 726 726 730 730 759 759 762 762
|
|
|
|
768 768 768 768 777 777 786 786 790 790 792 792 794 794
|
|
|
|
805 805 822 822 839 839 839 839 840 840 844 844 845 845
|
|
|
|
870 870 870 870 870 870 899 899 911 911 929 929 934 934
|
|
|
|
938 938 938 938 959 959 963 963 979 979}
|
|
|
|
|
|
|
|
do_execsql_test 5.4.3.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( PARTITION BY coalesce(a, '')
|
|
|
|
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE TIES )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1 {} 1
|
|
|
|
{} 1 {} 1 {} 1 {} 1 113 1 113 1 133 1 223 1 239 1 247 1
|
|
|
|
257 1 295 1 309 1 335 1 355 1 355 1 393 1 393 1 399 1
|
|
|
|
399 1 421 1 443 1 607 1 627 1 629 1 629 1 633 1 667 1
|
|
|
|
667 1 671 1 683 1 705 1 711 1 759 1 777 1 805 1 839 1
|
|
|
|
839 1 845 1 899 1 911 1 929 1 959 1 963 1 979 1}
|
|
|
|
|
|
|
|
do_execsql_test 5.4.4.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY a GROUPS 6 PRECEDING EXCLUDE TIES )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {158 158 355 355 399 399 629 629 667 667 870 158 870 158
|
|
|
|
870 158 870 158 870 158 870 158 870 870 911 158 934 158
|
|
|
|
934 158 934 158 934 158 934 158 934 158 934 158 934 158
|
|
|
|
934 158 934 158 934 158 934 158 934 158 934 158 934 158
|
|
|
|
934 158 934 158 934 158 934 158 934 158 934 158 934 158
|
|
|
|
934 158 934 158 934 158 934 158 959 102 959 102 959 102
|
|
|
|
959 102 959 102 959 102 959 102 959 102 959 102 959 102
|
|
|
|
959 102 959 102 959 102 959 102 959 102 959 102 959 113
|
|
|
|
959 113 959 113 959 113 959 113 959 113 959 113 959 113
|
|
|
|
959 113 959 113 959 113 959 158 959 158 959 158 959 158
|
|
|
|
959 158 963 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102 979 102 979 102
|
|
|
|
979 102 979 102 979 102 979 102 979 102}
|
|
|
|
|
|
|
|
do_execsql_test 5.4.4.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY a GROUPS 6 PRECEDING EXCLUDE TIES )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} 1 {} 1 355 1 399 1 629 1 667 1 2050 7 2050 7 2050 7
|
|
|
|
2273 7 2289 7 2359 7 2677 7 2961 7 4359 15 4359 15 4359 15
|
|
|
|
4359 15 4359 15 4359 15 4606 15 4752 15 4752 15 4758 15
|
|
|
|
4992 15 5064 15 5070 15 7840 28 7840 28 7840 28 7840 28
|
|
|
|
8447 28 8599 28 9206 34 9206 34 9206 34 9206 34 9206 34
|
|
|
|
10028 74 10028 74 10028 74 10051 34 10165 34 10396 65 10396 65
|
|
|
|
10396 65 10396 65 10449 74 10471 74 10529 65 10699 74 10751 65
|
|
|
|
10833 74 11002 81 11002 81 11002 81 11002 81 11010 41 11010 41
|
|
|
|
11079 65 11115 81 11123 41 11259 81 11359 65 11375 65 11441 57
|
|
|
|
11441 57 11441 57 11441 57 11441 57 11441 57 11639 41 11776 57
|
|
|
|
11787 41 11841 81 11841 81 11901 81 12370 57 12529 46 12529 46
|
|
|
|
12529 46 12529 46 12529 46 12529 46 12529 46 12529 46 12529 46
|
|
|
|
12824 46 13196 46}
|
|
|
|
|
|
|
|
do_execsql_test 5.4.5.1 {
|
|
|
|
SELECT max(c) OVER win,
|
|
|
|
min(c) OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY c RANGE BETWEEN 6 PRECEDING AND 7 FOLLOWING EXCLUDE TIES )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {102 102 113 113 113 113 133 133 148 148 160 158 160 158
|
|
|
|
160 158 208 208 224 223 224 223 239 234 239 234 239 234
|
|
|
|
252 247 257 247 257 247 257 250 257 252 295 295 309 309
|
|
|
|
336 330 336 330 336 330 346 346 355 354 355 354 355 354
|
|
|
|
399 393 399 393 399 393 399 393 399 393 412 412 421 421
|
|
|
|
430 430 443 443 480 480 480 480 574 572 574 572 607 607
|
|
|
|
618 618 618 618 634 627 634 627 634 627 634 627 634 629
|
|
|
|
652 652 667 660 671 667 671 667 671 667 671 667 683 683
|
|
|
|
711 705 716 705 716 711 730 726 730 726 762 759 768 759
|
|
|
|
768 762 768 762 777 777 792 786 794 786 794 786 794 790
|
|
|
|
805 805 822 822 845 839 845 839 845 839 845 839 845 839
|
|
|
|
870 870 870 870 870 870 899 899 911 911 934 929 938 929
|
|
|
|
938 934 938 934 963 959 963 959 979 979}
|
|
|
|
|
|
|
|
do_execsql_test 5.4.5.2 {
|
|
|
|
SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,
|
|
|
|
rank() OVER win
|
|
|
|
FROM t3
|
|
|
|
WINDOW win AS ( ORDER BY c RANGE BETWEEN 6 PRECEDING AND 7 FOLLOWING EXCLUDE TIES )
|
|
|
|
ORDER BY 1 , 2
|
|
|
|
} {{} 1 {} 5 {} 6 {} 6 {} 8 {} 9 {} 25 {} 34 {} 36 {} 38
|
|
|
|
{} 38 {} 40 {} 41 {} 43 {} 43 {} 50 {} 60 {} 61 {} 64
|
|
|
|
{} 64 {} 67 {} 68 {} 69 {} 70 {} 72 {} 78 {} 78 {} 78
|
|
|
|
{} 85 {} 85 113 2 113 2 133 4 223 10 223 11 239 12 239 13
|
|
|
|
239 14 247 15 257 18 257 19 295 20 309 21 335 22 335 23
|
|
|
|
335 24 355 27 355 27 421 35 443 37 504 16 504 17 607 42
|
|
|
|
683 56 710 26 711 59 759 62 759 63 777 66 805 71 899 81
|
|
|
|
911 82 929 83 929 84 979 89 1185 32 1185 32 1191 29 1191 29
|
|
|
|
1334 51 1338 52 1338 52 1416 57 1416 58 1584 31 1684 73
|
|
|
|
1684 73 1889 46 1889 46 1891 49 1922 87 1922 88 2005 54
|
|
|
|
2005 55 2518 45 2518 48 2523 75 2523 76 2523 77}
|
|
|
|
|
2019-03-08 23:57:05 +03:00
|
|
|
finish_test
|