/* Q8. List the names of persons and the number of items they bought. */ /* (joins person, closed\_auction)} */ FOR $p IN document("RainbowCore/Xmark/auction.xml")/people/person LET $a := FOR $t IN document("RainbowCore/Xmark/auction.xml")/closed_auctions/closed_auction WHERE $t/buyer/@person = $p/@id RETURN $t RETURN COUNT ($a)