Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for $c in doc("Clients.xml")//CLIENT
- let $r:=doc("Rent.xml")//RENT
- for $noOfRents in count($r[@CLIENT_ID=$c/@ID])
- order by $noOfRents descending
- return
- <client>
- {$c/@ID, $c//NAME, $c//SURNAME}
- <Rents>{$noOfRents}</Rents>
- </client>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement