comparison 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
comparison
equal deleted inserted replaced
1190:899875315bde 1191:61c3139eab12
1 table t : { A : int, B : int, C : int }
2
3 fun main () =
4 v <- queryX1 (SELECT t.A, t.C
5 FROM t
6 WHERE t.B = (SELECT MAX(U.B) AS M
7 FROM t AS U
8 WHERE U.A = t.A))
9 (fn r => <xml>{[r.A]},{[r.C]};</xml>);
10 return <xml>{v}</xml>