Try
> <counts>{
> for $thing in
> subsequence(collection($sp:reviewsColl)/descendant::reviews[1]//thing,1,50000)
> group by $name:=$thing/@name
> order by count($thing) descending
> return <thing name="{$name}" count="count($thing)}" />}
> </counts>
Michael Kay
Saxonica
On 7 Jan 2014, at 11:34, Ihe Onwuka <[email protected]> wrote:
>> <counts>{
>> for $thing in
>> subsequence(collection($sp:reviewsColl)/descendant::reviews[1]//thing,1,50000)
>> group by $name:=$thing/@name
>> return
>> let $count:=count($thing)
>> order by $count descending
>> return <thing name="{$name}" count="{$count}" />}
>> </counts>
_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk