Python Language Cypher Query Samples


Example

Count articles connected to a particular person over time

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

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 l.name='Donald Trump'
MATCH (n:NewsArticle)-[]->(m)
with m,count(n) as num where num>5
return labels(m)[0],(m.name), num order by num desc limit 10