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 <ihe.onw...@gmail.com> 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>

_______________________________________________
talk@x-query.com
http://x-query.com/mailman/listinfo/talk

Reply via email to