Merge 'Fix ungrouped aggregate with offset clause' from Preston Thorpe

closes #3300

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #3347
This commit is contained in:
Jussi Saurio
2025-09-26 09:13:16 +03:00
committed by GitHub
2 changed files with 47 additions and 13 deletions

View File

@@ -58,3 +58,9 @@ do_execsql_test_on_specific_db {:memory:} select-limit-comma-offset-equivalence
4
5}
# https://github.com/tursodatabase/turso/issues/3300
do_execsql_test_on_specific_db {:memory:} select-ungrouped-aggregate-with-offset-limit {
CREATE TABLE t(a INTEGER);
INSERT INTO t VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
SELECT COUNT(a) FROM t LIMIT 1 OFFSET 1;
} {}