This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MATCH(vote:HallOfFame{inducted: 'Y'}) | |
WITH vote | |
MATCH(player:People{playerID: vote.playerID}) | |
RETURN player, vote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MATCH p=()-[r:WAS_INDUCTED_TO_HALL_OF_FAME]->() RETURN p LIMIT 25; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MATCH(vote:HallOfFame{inducted: 'Y'}) | |
WITH vote | |
MATCH(person:People{playerID: vote.playerID}) | |
MERGE(person)-[:WAS_INDUCTED_TO_HALL_OF_FAME]->(vote); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// People to Batting | |
MATCH (player:People) | |
WITH player | |
MATCH (playerStats:Batting{playerID:player.playerID}) | |
MERGE (player)-[:HAS_BATTING_STATISTICS]->(playerStats); | |
// People to Fielding | |
MATCH (player:People) | |
WITH player | |
MATCH (playerStats:Fielding{playerID:player.playerID}) | |
MERGE (player)-[:HAS_FIELDING_STATISTICS]->(playerStats); | |
// People to Pitching | |
MATCH (player:People) | |
WITH player | |
MATCH (playerStats:Pitching{playerID:player.playerID}) | |
MERGE (player)-[:HAS_PITCHING_STATISTICS]->(playerStats); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Team to Player Batting Stats | |
MATCH (team:Teams) | |
WITH team | |
MATCH (playerStats:Batting{teamID:team.teamID, yearID: team.yearID}) | |
MERGE (playerStats)-[:BATTED_FOR]->(team); | |
// Team to Player Pitching Stats | |
MATCH (team:Teams) | |
WITH team | |
MATCH (playerStats:Pitching{teamID:team.teamID, yearID: team.yearID}) | |
MERGE (playerStats)-[:PITCHED_FOR]->(team); | |
// Team to Player Fielding Stats | |
MATCH (team:Teams) | |
WITH team | |
MATCH (playerStats:Fielding{teamID:team.teamID, yearID: team.yearID}) | |
MERGE (playerStats)-[:FIELDED_FOR]->(team); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment