Project

Profile

Help

How to connect?
Download (416 Bytes) Statistics
| Branch: | Revision:

he / src / use-cases / r / q16.xq @ a31dd97a

1
<result>
2
  {
3
    for $u in doc("users.xml")//user_tuple
4
    let $b := doc("bids.xml")//bid_tuple[userid = $u/userid]
5
    order by $u/userid
6
    return
7
        <user>
8
            { $u/userid }
9
            { $u/name }
10
            {
11
                if (empty($b))
12
                  then <status>inactive</status>
13
                  else <status>active</status>
14
            }
15
        </user>
16
  }
17
</result>
(20-20/42)