Schema
Find all Pokemon
MATCH (p:Pokemon) RETURN p;
Find all Pokemon by limiting the displayed results to 10
MATCH (p:Pokemon) RETURN p LIMIT 10;
Extract the subgraph of the Pokemon through their mega evolution, arriving at the type
MATCH (p:Pokemon)-[:MEGA_EVOLVE]->(f:MegaEvolution)-[:IS]-(t:Type)
RETURN p, f, t
Starting from the Pokemon “Charmander”, find the shortest path to get to the type “Dragon”. Docs of shortest path here if needed
MATCH (c:Pokemon{name: "Charmander"}),
(t:Type{name: "Dragon"}),
sp = shortestPath((c)-[*]-(t))
RETURN sp
Find how many Pokemon there are of each type
MATCH (type: Type)-[:IS]-(pokemon: Pokemon)
WITH type, count(pokemon) as quantity
RETURN type.name, quantity
ORDER BY quantity DESC
Simpler alternative
MATCH (type: Type)-[:IS]-(pokemon: Pokemon)
WITH type, count(pokemon) as quantity
ORDER BY quantity DESC