diff options
author | drh <drh@noemail.net> | 2000-06-08 15:10:46 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2000-06-08 15:10:46 +0000 |
commit | 4cfa793437906e51f6b6a86ecb87a6d3a726a8e2 (patch) | |
tree | 2030c994f6626440b7452103cb0ff887c09b70b1 /test/select3.test | |
parent | 6e142f547944745eb91b80248fae3149b9b1281a (diff) | |
download | sqlite-4cfa793437906e51f6b6a86ecb87a6d3a726a8e2.tar.gz sqlite-4cfa793437906e51f6b6a86ecb87a6d3a726a8e2.zip |
:-) (CVS 81)
FossilOrigin-Name: 61c381e7e6c85619b7b494417956fc209c5b7b84
Diffstat (limited to 'test/select3.test')
-rw-r--r-- | test/select3.test | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/select3.test b/test/select3.test index ceb9c6446..f77eae4b4 100644 --- a/test/select3.test +++ b/test/select3.test @@ -24,7 +24,7 @@ # focus of this file is testing aggregate functions and the # GROUP BY and HAVING clauses of SELECT statements. # -# $Id: select3.test,v 1.1 2000/06/06 18:00:16 drh Exp $ +# $Id: select3.test,v 1.2 2000/06/08 15:10:48 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -111,4 +111,19 @@ do_test select3-4.3 { } } {3 4 4 8 5 15} +do_test select3-5.1 { + execsql { + SELECT log, count(*), avg(n), max(n+log*2) FROM t1 + GROUP BY log + ORDER BY max(n+log*2), avg(n) + } +} {0 1 1 1 1 1 2 4 2 2 3.5 8 3 4 6.5 14 4 8 12.5 24 5 15 24 41} +do_test select3-5.2 { + execsql { + SELECT log, count(*), avg(n), max(n+log*2) FROM t1 + GROUP BY log + ORDER BY max(n+log*2), min(log,avg(n)) + } +} {0 1 1 1 1 1 2 4 2 2 3.5 8 3 4 6.5 14 4 8 12.5 24 5 15 24 41} + finish_test |