summaryrefslogtreecommitdiff
path: root/tests/subquery.ur
blob: 302175e5b05229d6e40421ef5f4eeaeb551f8ce6 (plain)
1
2
3
4
5
6
7
8
9
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>