Mercurial > urweb
comparison tests/agg.ur @ 244:71bafe66dbe1
Laconic -> Ur
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 31 Aug 2008 08:32:18 -0400 |
parents | tests/agg.lac@9182068c9d7c |
children | b66e692422a4 |
comparison
equal
deleted
inserted
replaced
243:2b9dfaffb008 | 244:71bafe66dbe1 |
---|---|
1 table t1 : {A : int, B : string, C : float} | |
2 table t2 : {A : float, D : int} | |
3 | |
4 val q1 = (SELECT COUNT( * ) AS X FROM t1) | |
5 val q2 = (SELECT AVG(t1.A) AS X FROM t1) | |
6 val q3 = (SELECT SUM(t1.C) AS X FROM t1) | |
7 val q4 = (SELECT MIN(t1.B) AS X, MAX(t1.A) AS Y FROM t1) | |
8 | |
9 (*val q5 = (SELECT t1.A FROM t1 GROUP BY t1.B)*) | |
10 val q5 = (SELECT SUM(t1.A) AS X FROM t1 GROUP BY t1.B) |