Mercurial > urweb
diff tests/subquery.ur @ 1191:61c3139eab12
Subquery expressions
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 25 Mar 2010 15:44:24 -0400 |
parents | |
children | 9c82548c97e9 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/subquery.ur Thu Mar 25 15:44:24 2010 -0400 @@ -0,0 +1,10 @@ +table t : { A : int, B : int, C : int } + +fun main () = + v <- queryX1 (SELECT t.A, t.C + FROM t + WHERE t.B = (SELECT MAX(U.B) AS M + FROM t AS U + WHERE U.A = t.A)) + (fn r => <xml>{[r.A]},{[r.C]};</xml>); + return <xml>{v}</xml>