Last active
October 25, 2018 04:47
-
-
Save bobvanluijt/a6f812589095f7435e4e8a99a7f8fef6 to your computer and use it in GitHub Desktop.
Idea for grouping
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# The result below shows the sum of population of all cities. | |
### | |
{ | |
Local { | |
Get(where:{ | |
operands: [{ | |
path: ["Things", "City", "population"], | |
operator: GreaterThan | |
valueInt: 1000000 | |
}] | |
},{ | |
group:{ | |
operands: [{ | |
path: ["Things", "City", "population"], | |
aggregate: SUM # other options: COUNT, MAX, MIN, SUM, AVG, | |
}] | |
} | |
}) { | |
Things { | |
City { | |
population | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Maybe they are simple to implement. I would expect so, based on my experience with SQL. However, Gremlin is not as well rounded, and I did not research this yet for Gremlin.