Group By & Aggregation
g[grouping_expr(x)](x:expression)
generates collection of groups
g := g[value(x/@state)](x:child(/Customer))
groups the Customer vertices by state
m[ e[ n[E, “StateReport”, y](null),)
n[A, “state”, child(pick(x))/@state](y),
n[A, “no_of_customers”, n[integer](count(x))](y)
<StateReport state=“…” no_of_customers=“…”/> elements.