diff tests/agg.lac @ 236:f5732dc1316c

More aggregate functions
author Adam Chlipala <adamc@hcoop.net>
date Thu, 28 Aug 2008 12:56:08 -0400
parents 0608a0cfd32a
children 9182068c9d7c
line wrap: on
line diff
--- a/tests/agg.lac	Thu Aug 28 11:59:46 2008 -0400
+++ b/tests/agg.lac	Thu Aug 28 12:56:08 2008 -0400
@@ -1,4 +1,7 @@
 table t1 : {A : int, B : string, C : float}
 table t2 : {A : float, D : int}
 
-val q1 = (SELECT COUNT( * ) AS N FROM t1)
+val q1 = (SELECT COUNT( * ) AS X FROM t1)
+val q2 = (SELECT AVG(t1.A) AS X FROM t1)
+val q3 = (SELECT SUM(t1.C) AS X FROM t1)
+val q4 = (SELECT MIN(t1.B) AS X, MAX(t1.A) AS Y FROM t1)