Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 35 additions & 3 deletions modules/ROOT/pages/introduction/cypher_tutorial.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -664,12 +664,44 @@ The below query searches the graph for outgoing relationships from the `Tom Hank
[source, cypher]
----
MATCH (tom:Person {name:'Tom Hanks'})-[r]->(m:Movie)
Return tom, type(r), m.title
RETURN type(r) AS type, m.title AS movie
----

The graph returned shows that he has 13 outgoing relationships connected to 12 different `Movie` nodes (12 have the `ACTED_IN` type and one has the `DIRECTED` type).
The result shows that he has 13 outgoing relationships connected to 12 different `Movie` nodes (12 have the `ACTED_IN` type and one has the `DIRECTED` type).

image::introduction_example1.svg[width="500",role="middle"]
.Result
[role="queryresult",options="header,footer",cols="2*<m"]
|===
| type | movie

| "ACTED_IN" | "Apollo 13"

| "ACTED_IN" | "You've Got Mail"

| "ACTED_IN" | "A League of Their Own"

| "ACTED_IN" | "That Thing You Do"

| "ACTED_IN" | "The Da Vinci Code"

| "ACTED_IN" | "Cloud Atlas"

| "ACTED_IN" | "Joe versus the Volcano"

| "ACTED_IN" | "Cast Away"

| "ACTED_IN" | "The Green Mile"

| "ACTED_IN" | "Sleepless in Seattle"

| "ACTED_IN" | "The Polar Express"

| "ACTED_IN" | "Charlie Wilson's War"

| "DIRECTED" | "That Thing You Do"

2+d|Rows: 13
|===

== Finding paths

Expand Down