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

Allow an aggregate function in the HAVING clause even if no aggregates appear

in the result set.  Ticket #187. (CVS 793)

FossilOrigin-Name: 33c6fd6b3dc271fa1f2d4500b4f76c736accefce
This commit is contained in:
drh
2002-12-03 02:34:49 +00:00
parent 174b619591
commit c66c5a266b
4 changed files with 32 additions and 24 deletions

View File

@ -12,7 +12,7 @@
# focus of this file is testing aggregate functions and the
# GROUP BY and HAVING clauses of SELECT statements.
#
# $Id: select3.test,v 1.6 2002/08/04 00:52:38 drh Exp $
# $Id: select3.test,v 1.7 2002/12/03 02:34:50 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -126,6 +126,14 @@ do_test select3-4.4 {
ORDER BY max(n)
}
} {3 4 4 8 5 15}
do_test select3-4.5 {
execsql {
SELECT log AS x FROM t1
GROUP BY x
HAVING count(*)>=4
ORDER BY max(n)
}
} {3 4 5}
do_test select3-5.1 {
execsql {