Skip to content

Instantly share code, notes, and snippets.

@jexp
Created January 16, 2012 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jexp/1618465 to your computer and use it in GitHub Desktop.
Save jexp/1618465 to your computer and use it in GitHub Desktop.
Cypher Time Tree Queries
start year = node:time(year='2011')
match year -[m:MONTH]-> month <-[:OCCURRED]-data
where m.month => 1 and m.month <= 11
return data
month could also be the relationship-type instead of :MONTH and filter on that:
start year = node:time(year='2011')
match year -[m]-> month <-[:OCCURRED]-data
where TYPE(m) != '12'
return data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment