(Q11) List the publishers who have published more than 100 books.

<big_publishers>
   FOR $p IN distinct(document("bib.xml")//publisher)
   LET $b := document("bib.xml")/book[publisher = $p]
   WHERE count($b) > 100
   RETURN $p
</big_publishers>
  • FLWR expression nested in an element constructor produces a well-formed XML document as its result
<<<  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15    >>>