Project

Profile

Help

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

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

1
let $highbid := max(for $z in doc("bids.xml")//bid_tuple/bid return number($z))
2
return
3
    <result>
4
     {
5
        for $item in doc("items.xml")//item_tuple,
6
            $b in doc("bids.xml")//bid_tuple[itemno = $item/itemno]
7
        where $b/bid = $highbid
8
        return
9
            <expensive_item>
10
                { $item/itemno }
11
                { $item/description }
12
                <high_bid>{ $highbid }</high_bid>
13
            </expensive_item>
14
     }
15
    </result>
(9-9/42)