cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Merge multiple relationship with ID


Here you can see all nodes connected with a single ID but when try to apply Cypher query to
merge all data and export as table form it is not working.

I have used a match query but the data is not showing correctly.

My expected output in CSV will be here mention one data example likewise need to export
more dataset in csv.

My expected output will be in csv

|PMID| AU| copyright| pub| Citation| country|

|2690338| Singer M|Med Inten..| Medline| 4271| United states|

1 ACCEPTED SOLUTION

It should work with this query, feel free to update the RETURN clause:

MATCH (a:id)-[By_copyright]->(b:copyright), (a)-[has_pub_type]->(c:pub), (a)-[Having_citation]->(d:citation), (a)-[By_author]->(e:author), (a)-[Drom_country]->(f:country)
RETURN a, b, c, d, e, f

View solution in original post

6 REPLIES 6

Hello @almastanul and welcome to the Neo4j community

It is not clear what you expect as result. Can you give us an example of the output you expect?

Regards,
Cobra

Hi @Cobra I have updated you can review it now.

It should work with this query, feel free to update the RETURN clause:

MATCH (a:id)-[By_copyright]->(b:copyright), (a)-[has_pub_type]->(c:pub), (a)-[Having_citation]->(d:citation), (a)-[By_author]->(e:author), (a)-[Drom_country]->(f:country)
RETURN a, b, c, d, e, f

It is showing no changes, no records.

There is a typo in my query, check every node label and every type of relationship.

Thanks @Cobra it is working after correct typo mistake in relationship.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online