Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-28-2021 07:05 PM
I am trying to filter females' and male relationships and get a table for both relations and find how many males and females are there? But My code is not helping me out to solve it> Any suggestions, I try with UNION ALL as well, didn't work for me \
> MATCH (std:student{gender: 'M'})-[:major]->(dgr:degree) <-[:administer]-(dep:department)
> where dep:department='Computer Science'
> MATCH (std:student{gender: 'F'})-[:major]->(dgr:degree) <-[:administer]-(dep:department)
> where dep:department='Computer Science'
> RETURN count(std.gender) as males,count(std.gender) as females
Blockquote
10-28-2021 09:55 PM
Try this:
MATCH (std:student)-[:major]->(dgr:degree) <-[:administer]-(dep:department)
where dep:department='Computer Science'
with distinct std.gender as gender, count(distinct std) as cnt
return gender, cnt
10-29-2021 04:38 AM
Please put Limit 11 on number of rows returned so that server will not send all the data to client machine.
Thanking you
G Sameer
All the sessions of the conference are now available online