Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-28-2020 03:52 AM
I am new to neo4j can you please help to write a cypher query for the following subgraph. We are using neo4j.3.5.x version.
A--->next--->S1<----Has-----S
A--->.next---->S2<-----Has----S
B--->next--->T1<----Has-----T
B--->next--->T2<----Has-----T
B--->.next---->M1<-----Has----M
I need B node because which connected differnt END nodes T,M.
Solved! Go to Solution.
05-29-2020 04:25 PM
Hello @rayapatir4
A request in the same style could do the job (you can add a Label to nodes):
MATCH (a)-[:NEXT]->()<-[:HAS_INSTANCE]-(c)
WITH a, count(DISTINCT c) AS nb_nodes
WHERE nb_nodes >= 2
RETURN a
Regards,
Cobra
05-28-2020 10:16 PM
I need find query.I need B node as it participated in 2 different end nodes T,M
05-29-2020 04:25 PM
Hello @rayapatir4
A request in the same style could do the job (you can add a Label to nodes):
MATCH (a)-[:NEXT]->()<-[:HAS_INSTANCE]-(c)
WITH a, count(DISTINCT c) AS nb_nodes
WHERE nb_nodes >= 2
RETURN a
Regards,
Cobra
05-30-2020 02:55 AM
Thank you for your quick help. Its working as expected.
05-30-2020 03:02 AM
No problem 🙂 I'm happy to hear it
All the sessions of the conference are now available online