Skip to content

MATCH

The MATCH statement provides the searching ability based on pattern matching.

A MATCH statement defines a search pattern and uses it to match data stored in Nebula Graph and to retrieve them in the form defined in the RETURN clause. A WHERE clause is often used together with the pattern as a filter to the search result.

The examples in this topic use the basketballplayer dataset as the sample dataset.

Syntax

The syntax of MATCH is relatively more flexible compared with that of other query statements such as GO or LOOKUP. But generally, it can be summarized as follows.

MATCH <pattern> [<WHERE clause>] RETURN <output>

The workflow of MATCH

  1. The MATCH statement uses a native index to locate a source vertex. The vertex can be in any position in a pattern. In other words, in a valid MATCH statement, there must be an indexed property or tag, or a specific VID. For how to index a property, see Create native index.

    Note

    The native index for VID is created by default, so you don't need to create an extra index if you want to match on VID.

  2. The MATCH statement searches through the pattern to match edges and other vertices.

  3. The MATCH statement retrieves data according to the RETURN clause.

OpenCypher compatibility

For now, nGQL DOES NOT support scanning all vertices and edges with MATCH. For example, MATCH (v) RETURN v.

Use patterns in MATCH statements

Make sure there is at least one index for the MATCH statement to use. If you want to create an index, but there are already vertices or edges related to the tag, edge type, or property that you want to create the index for, you have to rebuild the index after creation to make it take effect on existing vertices or edges.

Caution

Correct use of indexes can speed up queries, but indexes can dramatically reduce the write performance. The performance reduction can be as much as 90% or even more. DO NOT use indexes in production environments unless you are fully aware of their influences on your service.

nebula> CREATE TAG INDEX name ON player(name(20)); // Create an index on the name property.
Execution succeeded (time spent 2957/3986 us)

nebula> REBUILD TAG INDEX name; // Rebuild the index.
+------------+
| New Job Id |
+------------+
| 121        |
+------------+
Got 1 rows  (time spent 2676/3990 us)

nebula> SHOW JOB 121; // Make sure the rebuild job succeeded.
+----------------+---------------------+------------+------------+------------+
| Job Id(TaskId) | Command(Dest)       | Status     | Start Time | Stop Time  |
+----------------+---------------------+------------+------------+------------+
| 121            | "REBUILD_TAG_INDEX" | "FINISHED" | 1607073046 | 1607073046 |
+----------------+---------------------+------------+------------+------------+
| 0              | "storaged2"         | "FINISHED" | 1607073046 | 1607073046 |
+----------------+---------------------+------------+------------+------------+
| 1              | "storaged0"         | "FINISHED" | 1607073046 | 1607073046 |
+----------------+---------------------+------------+------------+------------+
| 2              | "storaged1"         | "FINISHED" | 1607073046 | 1607073046 |
+----------------+---------------------+------------+------------+------------+
Got 4 rows (time spent 1186/2998 us)

Match a vertex

You can use a user-defined variable in a pair of parentheses to represent a vertex in a pattern. For example: (v).

Match on tag

To match on a tag, make sure there is an applicable tag index. For how to create a tag index, see Create tag indexes.

Note

Tag indexes are different from property indexes. If there is an index for a property of a tag, but no index for the tag, you cannot match on the tag.

A vertex tag is specified with :<tag_name> in a pattern.

nebula> MATCH (v:player) RETURN v
+---------------------------------------------------------------+
| v                                                             |
+---------------------------------------------------------------+
| ("player102" :player{age: 33, name: "LaMarcus Aldridge"})     |
+---------------------------------------------------------------+
| ("player106" :player{age: 25, name: "Kyle Anderson"})         |
+---------------------------------------------------------------+
| ("player115" :player{age: 40, name: "Kobe Bryant"})           |
+---------------------------------------------------------------+
...

Match on vertex property

Tag properties are specified with {<prop_name>: <prop_value>} in a pattern after a tag.

The following example uses the name property to match a vertex.

nebula> MATCH (v:player{name:"Tim Duncan"}) RETURN v;
+----------------------------------------------------+
| v                                                  |
+----------------------------------------------------+
| ("player100" :player{name: "Tim Duncan", age: 42}) |
+----------------------------------------------------+

The WHERE clause can do the same thing:

nebula> MATCH (v:player) WHERE v.name == "Tim Duncan" RETURN v;
+----------------------------------------------------+
| v                                                  |
+----------------------------------------------------+
| ("player100" :player{name: "Tim Duncan", age: 42}) |
+----------------------------------------------------+

OpenCypher compatibility

  • In nGQL, == is the equality operator and = is the assignment operator (as in C++ or Java).
  • In openCypher 9, = is the equality operator.

Match on VID

You can use the VID to match a vertex. The id() function can retrieve the VID of a vertex.

nebula> MATCH (v) WHERE id(v) == 'player101' RETURN v;
+---------------------------------------------------+
| v                                                 |
+---------------------------------------------------+
| (player101) player.name:Tony Parker,player.age:36 |
+---------------------------------------------------+
Got 1 rows (time spent 1710/2406 us)

To match on multiple VIDs, use WHERE id(v) IN [vid_list].

nebula> MATCH (v:player { name: 'Tim Duncan' })--(v2) \
        WHERE id(v2) IN ["player101", "player102"] RETURN v2;
+-----------------------------------------------------------+
| v2                                                        |
+-----------------------------------------------------------+
| ("player101" :player{name: "Tony Parker", age: 36})       |
+-----------------------------------------------------------+
| ("player102" :player{name: "LaMarcus Aldridge", age: 33}) |
+-----------------------------------------------------------+
| ("player101" :player{name: "Tony Parker", age: 36})       |
+-----------------------------------------------------------+
Got 3 rows (time spent 3107/3683 us)

Match connected vertices

You can use the -- symbol to represent edges of both directions and match vertices connected by these edges.

Legacy

  • In nGQL 1.x, the -- symbol is used for inline comments.
  • Starting from nGQL 2.0, the -- symbol represents an incoming or outgoing edge.
nebula> MATCH (v:player{name:"Tim Duncan"})--(v2) RETURN v2.name AS Name;
+---------------------+
| Name                |
+---------------------+
| "Tony Parker"       |
+---------------------+
| "LaMarcus Aldridge" |
+---------------------+
| "Marco Belinelli"   |
+---------------------+
| "Danny Green"       |
+---------------------+
| "Aron Baynes"       |
+---------------------+
...
Got 13 rows (time spent 6029/8976 us)

And you can add a > or < to the -- symbol to specify the direction of an edge.

nebula> MATCH (v:player{name:"Tim Duncan"})-->(v2) RETURN v2.name AS Name;
+-----------------+
| Name            |
+-----------------+
| "Spurs"         |
+-----------------+
| "Tony Parker"   |
+-----------------+
| "Manu Ginobili" |
+-----------------+
Got 3 rows (time spent 2897/5993 us)

In the preceding example, --> represents an edge that starts from v and points to v2. To v, this is an outgoing edge, and to v2 this is an incoming edge.

To extend the pattern, add more edges and vertices.

nebula> MATCH (v:player{name:"Tim Duncan"})-->(v2)<--(v3) RETURN v3.name AS Name;
+---------------------+
| Name                |
+---------------------+
| "Tony Parker"       |
+---------------------+
| "Tiago Splitter"    |
+---------------------+
| "Dejounte Murray"   |
+---------------------+
| "Tony Parker"       |
+---------------------+
| "LaMarcus Aldridge" |
+---------------------+
...

If you don't need to refer to a vertex, you can omit the variable representing it in the parentheses.

nebula> MATCH (v:player{name:"Tim Duncan"})-->()<--(v3) RETURN v3.name AS Name;
+---------------------+
| Name                |
+---------------------+
| "Tony Parker"       |
+---------------------+
| "LaMarcus Aldridge" |
+---------------------+
| "Rudy Gay"          |
+---------------------+
| "Danny Green"       |
+---------------------+
| "Kyle Anderson"     |
+---------------------+
...

Match paths

Connected vertices and edges form a path. You can use a user-defined variable as follows to name a path.

nebula> MATCH p=(v:player{name:"Tim Duncan"})-->(v2) RETURN p;
+-------------------------------------------+
| p                                         |
+-------------------------------------------+
| <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})>   |
+-------------------------------------------+
| <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player125" :player{age: 41, name: "Manu Ginobili"})> |
+-------------------------------------------+
| <("player100" :player{age: 42, name: "Tim Duncan"})-[:serve@0 {end_year: 2016, start_year: 1997}]->("team204" :team{name: "Spurs"})> |
+-------------------------------------------+
Got 3 rows (time spent 3717/4573 us)

OpenCypher compatibility

In nGQL, the @ symbol represents the rank of an edge, but openCypher has no such a concept.

Match edges

Besides using --, -->, or <-- to indicate a nameless edge, you can use a variable in a pair of square brackets to represent a named edge. For example: -[e]-.

nebula> MATCH (v:player{name:"Tim Duncan"})-[e]-(v2) RETURN e;
+---------------------------------------------------------------------------+
| e                                                                         |
+---------------------------------------------------------------------------+
| [:follow "player101"->"player100" @0 {degree: 95}]                        |
+---------------------------------------------------------------------------+
| [:follow "player102"->"player100" @0 {degree: 75}]                        |
+---------------------------------------------------------------------------+
| [:serve "player100"->"team204" @0 {end_year: 2016, start_year: 1997}]     |
+---------------------------------------------------------------------------+
...

Match on edge types and properties

Just like tags, edge types are specified with :<edge_type>. For example: -[e:serve]-.

nebula> MATCH (v:player{name:"Tim Duncan"})-[e:serve]-(v2) RETURN e;
+---------------------------------------------------------------------------+
| e                                                                         |
+---------------------------------------------------------------------------+
| [:serve "player100"->"team204" @0 {end_year: 2016, start_year: 1997}]     |
+---------------------------------------------------------------------------+
Got 1 rows (time spent 5041/5630 us)

And edge type properties are specified with {<prop_name>: <prop_value>} after the :<edge_type>. For example: [e:follow{likeness:95}].

nebula> MATCH (v:player{name:"Tim Duncan"})-[e:follow{degree:95}]->(v2) RETURN e;
+--------------------------------------------------------+
| e                                                      |
+--------------------------------------------------------+
| [:follow "player100"->"player101" @0 {degree: 95}]     |
+--------------------------------------------------------+
| [:follow "player100"->"player125" @0 {degree: 95}]     |
+--------------------------------------------------------+
Got 2 rows (time spent 6080/6728 us)

Match on multiple edge types

The | symbol can help matching on multiple edge types. For example: [e:follow|:serve].

nebula> MATCH (v:player{name:"Tim Duncan"})-[e:follow|:serve]->(v2) RETURN e;
+---------------------------------------------------------------------------+
| e                                                                         |
+---------------------------------------------------------------------------+
| [:follow "player100"->"player101" @0 {degree: 95}]                        |
+---------------------------------------------------------------------------+
| [:follow "player100"->"player125" @0 {degree: 95}]                        |
+---------------------------------------------------------------------------+
| [:serve "player100"->"team204" @0 {end_year: 2016, start_year: 1997}]     |
+---------------------------------------------------------------------------+
Got 3 rows (time spent 4264/4976 us)

Match multiple edges

You can expand a pattern to match multiple edges in a path.

nebula> MATCH (v:player{name:"Tim Duncan"})-[]->(v2)<-[e:serve]-(v3) RETURN v2, v3;
+------------------------------------+-----------------------------------------------------------+
| v2                                 | v3                                                        |
+------------------------------------+-----------------------------------------------------------+
| ("player204" :team{name: "Spurs"}) | ("player101" :player{name: "Tony Parker", age: 36})       |
+------------------------------------+-----------------------------------------------------------+
| ("player204" :team{name: "Spurs"}) | ("player102" :player{name: "LaMarcus Aldridge", age: 33}) |
+------------------------------------+-----------------------------------------------------------+
| ("player204" :team{name: "Spurs"}) | ("player103" :player{age: 32, name: "Rudy Gay"})          |
+------------------------------------+-----------------------------------------------------------+
...

Match fixed-length paths

To match a fixed-length path, use the :<edge_type>*<hop> pattern. hop must be a non-negative integer.

nebula> MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*2]->(v2) RETURN DISTINCT v2 AS Friends;
+-----------------------------------------------------------+
| Friends                                                   |
+-----------------------------------------------------------+
| ("player100" :player{name: "Tim Duncan", age: 42})        |
+-----------------------------------------------------------+
| ("player102" :player{name: "LaMarcus Aldridge", age: 33}) |
+-----------------------------------------------------------+
| ("player125" :player{name: "Manu Ginobili", age: 41})     |
+-----------------------------------------------------------+
Got 3 rows (time spent 4863/5591 us)

If hop is 0, the pattern matches the source vertex on the path.

nebula> MATCH (v:player{name:"Tim Duncan"}) -[*0]-> (v2) RETURN v2;
+----------------------------------------------------+
| v2                                                 |
+----------------------------------------------------+
| ("player100" :player{age: 42, name: "Tim Duncan"}) |
+----------------------------------------------------+
Got 1 rows (time spent 2785/3377 us)

Match variable-length paths

You can use the :<edge_type>*[minHop]..<maxHop> pattern to match variable-length paths.

Parameter Description
minHop Optional. Represents the minimum length of the path. minHop must be a non-negative integer. The default value is 1.
maxHop Required. Represents the maximum length of the path. maxHop must be a non-negative integer. It has no default value.

OpenCypher compatibility

  • In nGQL, maxHop is required. And .. cannot be omitted after minHop.
  • In openCypher, maxHop is optional and default to infinity. When no bounds are given, .. can be omitted.
nebula> MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*1..3]->(v2) \
        RETURN v2 AS Friends;
+-----------------------------------------------------------+
| Friends                                                   |
+-----------------------------------------------------------+
| ("player100" :player{age: 42, name: "Tim Duncan"})        |
+-----------------------------------------------------------+
| ("player101" :player{age: 36, name: "Tony Parker"})       |
+-----------------------------------------------------------+
| ("player125" :player{age: 41, name: "Manu Ginobili"})     |
+-----------------------------------------------------------+
| ("player102" :player{age: 33, name: "LaMarcus Aldridge"}) |
+-----------------------------------------------------------+
Got 4 rows (time spent 6166/6887 us)

You can use the DISTINCT keyword to aggregate duplicate results.

nebula> MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*1..3]->(v2:player) \
        RETURN DISTINCT v2 AS Friends, count(v2);
+-----------------------------------------------------------+-----------+
| Friends                                                   | COUNT(v2) |
+-----------------------------------------------------------+-----------+
| ("player125" :player{age: 41, name: "Manu Ginobili"})     | 3         |
+-----------------------------------------------------------+-----------+
| ("player102" :player{age: 33, name: "LaMarcus Aldridge"}) | 1         |
+-----------------------------------------------------------+-----------+
| ("player100" :player{age: 42, name: "Tim Duncan"})        | 4         |
+-----------------------------------------------------------+-----------+
| ("player101" :player{age: 36, name: "Tony Parker"})       | 3         |
+-----------------------------------------------------------+-----------+
Got 4 rows (time spent 5502/6556 us)

If minHop is 0, the pattern matches the source vertex. Compared to the preceding statement, the following statement uses 0 as the minHop, so in the following result set "Tim Duncan" is counted one more time than it is in the preceding result set because it is the source vertex.

nebula> MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*0..3]->(v2:player) \
        RETURN DISTINCT v2 AS Friends, count(v2);
+-----------------------------------------------------------+-----------+
| Friends                                                   | COUNT(v2) |
+-----------------------------------------------------------+-----------+
| ("player125" :player{age: 41, name: "Manu Ginobili"})     | 3         |
+-----------------------------------------------------------+-----------+
| ("player101" :player{age: 36, name: "Tony Parker"})       | 3         |
+-----------------------------------------------------------+-----------+
| ("player102" :player{age: 33, name: "LaMarcus Aldridge"}) | 1         |
+-----------------------------------------------------------+-----------+
| ("player100" :player{age: 42, name: "Tim Duncan"})        | 5         |
+-----------------------------------------------------------+-----------+
Got 4 rows (time spent 5553/6275 us)

Match variable-length paths with multiple edge types

You can specify multiple edge types in a fixed-length or variable-length pattern. In this case, hop, minHop, and maxHop take effect on all edge types.

nebula> MATCH p=(v:player{name:"Tim Duncan"})-[e:follow|serve*2]->(v2) \
        RETURN DISTINCT v2;
+-----------------------------------------------------------+
| v2                                                        |
+-----------------------------------------------------------+
| ("player100" :player{name: "Tim Duncan", age: 42})        |
+-----------------------------------------------------------+
| ("player102" :player{name: "LaMarcus Aldridge", age: 33}) |
+-----------------------------------------------------------+
| ("player125" :player{name: "Manu Ginobili", age: 41})     |
+-----------------------------------------------------------+
| ("player204" :team{name: "Spurs"})                        |
+-----------------------------------------------------------+
| ("player215" :team{name: "Hornets"})                      |
+-----------------------------------------------------------+
Got 5 rows (time spent 3834/4571 us)

Common retrieving operations

This section shows how to retrieve commonly used items with MATCH statements.

Retrieve vertex or edge information

Use RETURN {<vertex_name> | <edge_name>} to retrieve all the information of a vertex or an edge.

nebula> MATCH (v:player{name:"Tim Duncan"}) RETURN v;
+----------------------------------------------------+
| v                                                  |
+----------------------------------------------------+
| ("player100" :player{name: "Tim Duncan", age: 42}) |
+----------------------------------------------------+
Got 1 rows (time spent 1863/2545 us)
nebula> MATCH (v:player{name:"Tim Duncan"})-[e]->(v2) RETURN e;
+---------------------------------------------------------------------------+
| e                                                                         |
+---------------------------------------------------------------------------+
| [:follow "player100"->"player101" @0 {degree: 95}]                        |
+---------------------------------------------------------------------------+
| [:follow "player100"->"player125" @0 {degree: 95}]                        |
+---------------------------------------------------------------------------+
| [:serve "player100"->"team204" @0 {end_year: 2016, start_year: 1997}]     |
+---------------------------------------------------------------------------+
Got 3 rows (time spent 3139/3773 us)

Retrieve VIDs

Use the id() function to retrieve VIDs.

nebula> MATCH (v:player{name:"Tim Duncan"}) RETURN id(v);
+-------------+
| id(v)       |
+-------------+
| "player100" |
+-------------+
Got 1 rows (time spent 2070/2747 us)

Retrieve tags

Use the labels() function to retrieve the list of tags on a vertex.

nebula> MATCH (v:player{name:"Tim Duncan"}) RETURN labels(v);
+------------+
| labels(v)  |
+------------+
| ["player"] |
+------------+
Got 1 rows (time spent 2198/2941 us)

To retrieve the nth element in the labels(v) list, use labels(v)[n-1]. The following example shows how to use labels(v)[0] to retrieve the first tag in the list.

nebula> MATCH (v:player{name:"Tim Duncan"}) RETURN labels(v)[0];
+--------------+
| labels(v)[0] |
+--------------+
| "player"     |
+--------------+
Got 1 rows (time spent 2609/3481 us)

Retrieve a single property on a vertex or an edge

Use RETURN {<vertex_name> | <edge_name>}.<property> to retrieve a single property.

nebula> MATCH (v:player{name:"Tim Duncan"}) RETURN v.age;
+-------+
| v.age |
+-------+
| 42    |
+-------+
Got 1 rows (time spent 2261/2973 us)

Use AS to specify an alias for a property.

nebula> MATCH (v:player{name:"Tim Duncan"}) RETURN v.age AS Age;
+-----+
| Age |
+-----+
| 42  |
+-----+
Got 1 rows (time spent 1762/2321 us)

Retrieve all properties on a vertex or an edge

Use the properties() function to retrieve all properties on a vertex or an edge.

nebula> MATCH p=(v:player{name:"Tim Duncan"})-[]->(v2) RETURN properties(v2);
+------------------------------------+
| properties(v2)                     |
+------------------------------------+
| {"name":"Spurs"}                   |
+------------------------------------+
| {"name":"Tony Parker", "age":36}   |
+------------------------------------+
| {"age":41, "name":"Manu Ginobili"} |
+------------------------------------+
Got 3 rows (time spent 2943/3541 us)

Retrieve edge types

Use the type() function to retrieve the types of the matched edges.

nebula> MATCH p=(v:player{name:"Tim Duncan"})-[e]->() RETURN DISTINCT type(e);
+----------+
| type(e)  |
+----------+
| "follow" |
+----------+
| "serve"  |
+----------+
Got 3 rows (time spent 3776/4660 us)

Retrieve paths

Use RETURN <path_name> to retrieve all the information of the matched paths.

nebula> MATCH p=(v:player{name:"Tim Duncan"})-[*3]->() RETURN p;
+-------------------------------------------------------------------------------------------------+
| p                                                                                               |
+-------------------------------------------------------------------------------------------------+
| <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:follow@0 {degree: 90}]->("player102" :player{age: 33, name: "LaMarcus Aldridge"})-[:serve@0 {end_year: 2019, start_year: 2015}]->("team204" :team{name: "Spurs"})>           |
+-------------------------------------------------------------------------------------------------+
| <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:follow@0 {degree: 90}]->("player102" :player{age: 33, name: "LaMarcus Aldridge"})-[:serve@0 {end_year: 2015, start_year: 2006}]->("team203" :team{name: "Trail Blazers"})>   |
+-------------------------------------------------------------------------------------------------+
| <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:follow@0 {degree: 90}]->("player102" :player{age: 33, name: "LaMarcus Aldridge"})-[:follow@0 {degree: 75}]->("player101" :player{age: 36, name: "Tony Parker"})>             |
+-------------------------------------------------------------------------------------------------+
...

Retrieve vertices in a path

Use the nodes() function to retrieve all vertices in a path.

nebula> MATCH p=(v:player{name:"Tim Duncan"})-[]->(v2) RETURN nodes(p);
+---------------------------------------------------------------------------------------------------------------------+
| nodes(p)                                                                                                            |
+---------------------------------------------------------------------------------------------------------------------+
| [("player100" :star{} :player{age: 42, name: "Tim Duncan"}), ("player204" :team{name: "Spurs"})]                    |
+---------------------------------------------------------------------------------------------------------------------+
| [("player100" :star{} :player{age: 42, name: "Tim Duncan"}), ("player101" :player{name: "Tony Parker", age: 36})]   |
+---------------------------------------------------------------------------------------------------------------------+
| [("player100" :star{} :player{age: 42, name: "Tim Duncan"}), ("player125" :player{name: "Manu Ginobili", age: 41})] |
+---------------------------------------------------------------------------------------------------------------------+
Got 3 rows (time spent 2529/3128 us)

Retrieve edges in a path

Use the relationships() function to retrieve all edges in a path.

nebula> MATCH p=(v:player{name:"Tim Duncan"})-[]->(v2) RETURN relationships(p);
+-----------------------------------------------------------------------------+
| relationships(p)                                                            |
+-----------------------------------------------------------------------------+
| [[:follow "player100"->"player101" @0 {degree: 95}]]                        |
+-----------------------------------------------------------------------------+
| [[:follow "player100"->"player125" @0 {degree: 95}]]                        |
+-----------------------------------------------------------------------------+
| [[:serve "player100"->"team204" @0 {end_year: 2016, start_year: 1997}]]     |
+-----------------------------------------------------------------------------+
Got 3 rows (time spent 2715/3363 us)

Retrieve path length

Use the length() function to retrieve the length of a path.

nebula> MATCH p=(v:player{name:"Tim Duncan"})-[*..2]->(v2) \
        RETURN p AS Paths, length(p) AS Length;
+----------------------------------------------------------------------+--------+
| Paths                                                                | Length |
+----------------------------------------------------------------------+--------+
| <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player125" :player{age: 41, name: "Manu Ginobili"})-[:serve@0 {end_year: 2018, start_year: 2002}]->("team204" :team{name: "Spurs"})>   | 2      |
+----------------------------------------------------------------------+--------+
| <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player125" :player{age: 41, name: "Manu Ginobili"})-[:follow@0 {degree: 90}]->("player100" :player{age: 42, name: "Tim Duncan"})>      | 2      |
+----------------------------------------------------------------------+--------+
|  <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:serve@0 {end_year: 2019, start_year: 2018}]->("team215" :team{name: "Hornets"})>  | 2      |
+----------------------------------------------------------------------+--------+
| <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:serve@0 {end_year: 2018, start_year: 1999}]->("team204" :team{name: "Spurs"})>     | 2      |
+----------------------------------------------------------------------+--------+
| <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:follow@0 {degree: 95}]->("player125" :player{age: 41, name: "Manu Ginobili"})>     | 2      |
+----------------------------------------------------------------------+--------+
| <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:follow@0 {degree: 90}]->("player102" :player{age: 33, name: "LaMarcus Aldridge"})> | 2      |
+----------------------------------------------------------------------+--------+
| <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:follow@0 {degree: 95}]->("player100" :player{age: 42, name: "Tim Duncan"})>        | 2      |
+----------------------------------------------------------------------+--------+
| <("player100" :player{age: 42, name: "Tim Duncan"})-[:serve@0 {end_year: 2016, start_year: 1997}]->("team204" :team{name: "Spurs"})>                                                                                   | 1      |
+----------------------------------------------------------------------+--------+
| <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player125" :player{age: 41, name: "Manu Ginobili"})>                                                                                   | 1      |
+----------------------------------------------------------------------+--------+

Last update: April 22, 2021
Back to top