diff options
author | drh <drh@noemail.net> | 2002-12-03 02:34:49 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2002-12-03 02:34:49 +0000 |
commit | c66c5a266bf19ca0a68b6dc8034c06e86db47918 (patch) | |
tree | 07ccdf124acca703591b904f3930ec3e18b0a99b /test/select3.test | |
parent | 174b619591e546f206c9c0c631622c990f89d1d1 (diff) | |
download | sqlite-c66c5a266bf19ca0a68b6dc8034c06e86db47918.tar.gz sqlite-c66c5a266bf19ca0a68b6dc8034c06e86db47918.zip |
Allow an aggregate function in the HAVING clause even if no aggregates appear
in the result set. Ticket #187. (CVS 793)
FossilOrigin-Name: 33c6fd6b3dc271fa1f2d4500b4f76c736accefce
Diffstat (limited to 'test/select3.test')
-rw-r--r-- | test/select3.test | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/select3.test b/test/select3.test index 78d406b52..af050f60a 100644 --- a/test/select3.test +++ b/test/select3.test @@ -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 { |