csy3024-assignment-1/scripts/queries/query7.cyp

7 lines
273 B
Plaintext

//Display the top 5 teams that have the best away winning records
MATCH (t:Team)-[:PLAYED_IN {played: "Away", result: "Won"}]->(m:Match)
WITH t, count(m) AS away_matches_won
ORDER BY away_matches_won DESC
RETURN t.name AS best_away_winning_record, away_matches_won
LIMIT 5