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

8 lines
298 B
Plaintext

//Display the team with the most draws in January
MATCH (t:Team)-[:PLAYED_IN {result: "Drew"}]->(m:Match)
WHERE m.date >= date("2018-01-01") AND m.date <= date("2018-01-31")
WITH t, count(m) as drawn_matches
ORDER BY drawn_matches DESC
RETURN t.name AS most_draws_in_january, drawn_matches
LIMIT 1