Skip to content

Instantly share code, notes, and snippets.

@AboorvaDevarajan
Last active August 29, 2015 14:07
Show Gist options
  • Save AboorvaDevarajan/a6b375be9fe48d5b5967 to your computer and use it in GitHub Desktop.
Save AboorvaDevarajan/a6b375be9fe48d5b5967 to your computer and use it in GitHub Desktop.
Graph Neo4j (Cypher Queries)
= How to create a GraphGist
:neo4j-version: 2.0.0
:author: Aboorva Devarajan
== Include a query console
+//console+
becomes:
//console
== Define a http://docs.neo4j.org/chunked/snapshot/cypher-query-lang.html[Cypher] query
[source,cypher]
----
CREATE ( U:User {user_id:1 , username:'abu' , password:'password' , age:20 } )
RETURN U.username AS Username, U.password AS Password
----
[source,cypher]
----
CREATE ( U:User {user_id:2 , username:'scott' , password:'password' , age:29 } )
RETURN U.username AS Username, U.password AS Password
----
[source,cypher]
----
CREATE ( U:User {user_id:3 , username:'scott' , password:'password' , age:29 } )
RETURN U.username AS Username, U.password AS Password
----
[source,cypher]
----
CREATE ( U:User {user_id:4 , username:'emily' , password:'password' , age:23 } )
RETURN U.username AS Username, U.password AS Password
----
[source,cypher]
----
CREATE ( U:User {user_id:5, username:'alice' , password:'password' , age:33 })
RETURN U.username AS Username, U.password AS Password
----
[source,cypher]
----
CREATE ( U:User {user_id:6, username:'john' , password:'password' , age:55 })
RETURN U.username AS Username, U.password AS Password
----
[source,cypher]
----
CREATE ( U:User {user_id:7, username:'ron' , password:'password' , age:24 })
RETURN U.username AS Username, U.password AS Password
----
[source,cypher]
----
CREATE ( U:User {user_id:8, username:'harry' , password:'password' , age:24 })
RETURN U.username AS Username, U.password AS Password
----
[source,cypher]
----
CREATE ( U:User {user_id:9, username:'lucy' , password:'password' , age:18 })
RETURN U.username AS Username, U.password AS Password
----
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment