blob: 6a484dfa035b667efaf0bfe1f25b7a479a25f1fe [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001// count, sum, avg
2for $o in recordset(['oid', 'int32', 'date', 'int32', 'cid', 'int32', 'total', 'float'], 'osfiles', ['nc1', 'data/spj01/ord1.adm'], ['nc2', 'data/spj01/ord2.adm'])
3group by $cid := $o.cid with $o
4return { "cid": $cid , "ordpercust": count($o),
5 "totalcust": sum(for $i in $o return $i.total),
6 "avgcust": avg(for $i in $o return $i.total) }
7