1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Allow aggregate sub-selects within ORDER BY and PARTITION BY clauses of window frame definitions.

FossilOrigin-Name: 3daab94977af5e8a95690acc555540311403d890a3261a9757c633fcaaf428a9
This commit is contained in:
dan
2021-05-19 14:49:51 +00:00
parent 9088186bfb
commit 3d691fd9ff
6 changed files with 93 additions and 12 deletions

View File

@ -472,6 +472,22 @@ execsql_test 8.4 {
);
}
==========
execsql_test 9.1 {
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
CREATE TABLE t1(a INTEGER);
CREATE TABLE t2(y INTEGER);
}
execsql_test 9.2 {
SELECT (
SELECT max(a) OVER ( ORDER BY (SELECT sum(a) FROM t1) )
+ min(a) OVER()
)
FROM t1
}
finish_test