[xquery-talk] group by and having
Martin Probst
martin at x-hive.com
Fri Aug 4 12:39:37 PDT 2006
Hi,
you usually do something like this:
SELECT country, avg(salary) FROM bla GROUP BY country
translates to something like this:
for $country in distinct-values(//country)
let $emp_per_country := //employee[country = $country]
return ($country, avg($emp_per_country/salary)
HTH,
Martin
Am 03.08.2006 um 23:09 schrieb fatma helmy:
> how to write in xquery the statements equavelnet to group by ,
> having from sql?
> _______________________________________________
> talk at xquery.com
> http://xquery.com/mailman/listinfo/talk
>
More information about the talk
mailing list