krlawrence / graph

Practical Gremlin - An Apache TinkerPop Tutorial
Apache License 2.0
830 stars 251 forks source link

Expand section on discovering graph schema using queries #146

Open krlawrence opened 5 years ago

krlawrence commented 5 years ago

Coverage could be expanded to include simple things such as count() and groupCount() by label as well as more interesting queries such as

gremlin> g.V().outE().otherV().groupCount().by(path().by(label))                    
==>{[country, contains, airport]=3424, 
    [continent, contains, airport]=3424, 
    [airport, route, airport]=48320}                                                            

gremlin> g.V().inE().otherV().groupCount().by(path().by(label))                     
==>{[airport, contains, country]=3424, 
    [airport, contains, continent]=3424, 
    [airport, route, airport]=48320}
krlawrence commented 5 years ago

Realized I already have an issue for this.

krlawrence commented 5 years ago

Actually the issue I was thinking of is more about upfront design so this is a different one.