0 Replies - 3392 Views - Last Post: 04 December 2012 - 11:27 AM Rate Topic: -----

#1 reihane ce   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 30-October 12

cypher query in neo4j

Posted 04 December 2012 - 11:27 AM

hello, i created nodes in java az groups and users.i want to write a query that shows the number of persons each group.
my users have the "sex" property.i want to show the number of Male and Female but i can only show one of them.neo4j doesn't have GROUPBY.

ExecutionEngine engine = new ExecutionEngine( graphDb );
Map<String, Object> params=new HashMap<String, Object>();
params.put("query", "name:*");
ExecutionResult result = engine.execute( "start n=node:groups({query}) match n<-[:Members_In]-x where x.Sex='Male' return n.name, count(x)"

n is group node.
x is the members of each group.how can i count the number of females and males together?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1