I have a Large Group and I want to apply Grouping on a SubGraph.
Refering to the example given on Official Graph Grouping Graph Grouping - APOC Extended Documentation
Create Graph:
with ["US","DE","UK","FR","CA","BR","SE"] as tld
unwind range(1,1000) as id
create (u:User {id:id, age : id % 100, female: rand() < 0.5, name: "Name "+id, country:tld[toInteger(rand()*size(tld))]})
with collect(u) as users
unwind users as u
with u, users[toInteger(rand()*size(users))] as u2
where u <> u2
merge (u)-[:KNOWS]-(u2);
Apply Grouping
call apoc.nodes.group(['*'], ['country'])
Say in this example I want to get the Grouping results only on threee Countries 'US','UK' and 'CA' or Age between 20 and 30 or Female=false
How can I achieve this?
I tried going through the Offiical Documentation on Virtual Grpahs and Graph Grouping but it didn't helped.