Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-01-2020 12:41 AM
HI
I use the follwowing query
MATCH
((node_left: org)-[relationship_leftnode_currentstatus: current_status]->(node_currentstatus)),
((node_left)-[relationship_leftnode_hasmail: has_mail]->(node_mail))
CALL {
WITH node_left
MATCH ((node_left)-[relationship_leftnode_hasmail: has_mail]->(node_mail))
WITH distinct node_mail LIMIT 10
RETURN collect(node_mail.name) AS MailList
}
RETURN
node_left.name AS LeftNode ,
MailList,
node_currentstatus.name AS CurrentStatus;
Unfortunately I get as result 2 times exact the seleceted row back ... Can anyone tell me how to use DISTINCT correctly?
│"LeftNode" │"MailList" │"CurrentStatus"│
│"_AdminOrg"│["admingroup@local","rootmessages@local"]│"active - Org" │
│"_AdminOrg"│["admingroup@local","rootmessages@local"]│"active - Org" │
Thanks rob
12-01-2020 12:43 AM
Sorry i found it myself
MATCH
((node_left: org)-[relationship_leftnode_currentstatus: current_status]->(node_currentstatus))
CALL {
WITH node_left
MATCH ((node_left)-[relationship_leftnode_hasmail: has_mail]->(node_mail))
WITH distinct node_mail LIMIT 10
RETURN collect(node_mail.name) AS MailList
}
RETURN
node_left.name AS LeftNode ,
MailList,
node_currentstatus.name AS CurrentStatus;
All the sessions of the conference are now available online