Python Language Neo4j and Cypher using Py2Neo Cypher Query Samples


Count articles connected to a particular person over time

MATCH (n)-[]->(l) 
where'Donald Trump'
RETURN,count(*) order by

Search for other People / Locations connected to the same news articles as Trump with at least 5 total relationship nodes.

MATCH (n:NewsArticle)-[]->(l)
where'Donald Trump'
MATCH (n:NewsArticle)-[]->(m)
with m,count(n) as num where num>5
return labels(m)[0],(, num order by num desc limit 10