1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Allow a HAVING clause on any aggregate query, even if there is no GROUP BY

clause.  This brings SQLite into closer agreement with PostgreSQL and fixes
the concern raised by 
[forum:/forumpost/1a7fea4651|forum post 1a7fea4651].

FossilOrigin-Name: 9322a7c21f1c22ba00e9b889223e89bc1591db6e561ce05091e905e98c1bf2b3
This commit is contained in:
drh
2022-06-21 13:41:24 +00:00
parent 4af6462fb8
commit b9294de1e6
6 changed files with 26 additions and 19 deletions

View File

@ -2203,5 +2203,10 @@ do_catchsql_test 71.0 {
ORDER BY b;
} {/1 {.*}/}
do_execsql_test 72.1 {
CREATE TABLE dual(dummy); INSERT INTO dual VALUES('X');
CREATE VIEW v1(x,y) AS SELECT RANK() OVER (PARTITION BY 0), SUM(0) FROM dual;
SELECT * FROM v1 WHERE true;
} {1 0}
finish_test