0

Consider I have person vertices and these vertices have a studied-at edge to school vertices . If school vertices have a name property and for some reason if there are few person vertices that have school vertices with duplicate name property

For example a groupCount() query will give

g.V().hasLabel('person').out('studied-at').groupCount().by('name')
==>[s1:2]

Here s1 is the name of the school , meaning person vertices have schools with duplicate school names.

How to find such person vertices

Hemant
  • 1
  • 1
    Not sure what you are asking.. the above query answer the question of how many persons studied at the same school by name. And does not necessarily mean that there are duplicate school names look at this simple graph: https://gremlify.com/ay – noam621 May 26 '20 at 12:26
  • Um above query was simply for demo , it is not the exact situation So basically I want to find out the vertices(A) that has an edge with other vertices(B) where B vertex can have a property-value pair that repeat in other B vertices . I want to find out all A that has the above situation – Hemant May 26 '20 at 13:37
  • 1
    It often helps folks answer Gremlin questions if you provide a Gremlin script with some sample data along with desired output - here is an example https://stackoverflow.com/questions/51388315/gremlin-choose-one-item-at-random – stephen mallette May 27 '20 at 09:44

0 Answers0