Hi all,
Pardon my novice question here. I am new in gremlin. I am trying to do a simple count on the non existing edges. I can separately count number students in a university and separately count how many students have math class. I am interested to get the negative count which is how many student in each university does not have a math class and order this count. So my query looks like something like this so far.
g.V().hasLabel("student").has("university_name","MIT").as("u").groupCount("a").by("university_name").group("b").by("university_name").by(bothE("has").otherV().has("name","math").count()).cap("a","b")
my result looks like this
total number of students are 200 and 50 of them has taken math
[a:[MIT:200],b:[MIT:50]]
I want my results to be
MIT=150
which means 150 students did not taken math class yet. Then I want to order this count for every university.