summaryrefslogtreecommitdiff
path: root/tests/group_by.lac
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-08-21 14:09:08 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-08-21 14:09:08 -0400
commit919c2a950ff74af266791e88a258c7ff09be4839 (patch)
tree02d23cc3d6d72e84b9232fd999fa1dd614990ef4 /tests/group_by.lac
parent4832e63e1f6c7b5bb7c098e371c794111f32f878 (diff)
GROUP BY and HAVING
Diffstat (limited to 'tests/group_by.lac')
-rw-r--r--tests/group_by.lac6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/group_by.lac b/tests/group_by.lac
index 2b5d4dd1..50cf553a 100644
--- a/tests/group_by.lac
+++ b/tests/group_by.lac
@@ -3,3 +3,9 @@ table t2 : {A : float, D : int}
val q1 = (SELECT * FROM t1 GROUP BY t1.B)
val q2 = (SELECT * FROM t1, t2 GROUP BY t1.B, t2.D, t1.A)
+
+val q3 = (SELECT * FROM t1 WHERE t1.A = 0 GROUP BY t1.B)
+val q4 = (SELECT * FROM t1 WHERE t1.A = 0 GROUP BY t1.C HAVING t1.C < 0.2)
+
+val q5 = (SELECT t1.A, t2.D FROM t1, t2 GROUP BY t2.D, t1.A)
+val q6 = (SELECT t1.A, t2.D FROM t1, t2 WHERE t1.C = 0.0 GROUP BY t2.D, t1.A HAVING t1.A = 0 AND t2.D = 17)