Skip to content

Instantly share code, notes, and snippets.

@vladbatushkov
Last active August 1, 2019 18:13
Show Gist options
  • Save vladbatushkov/8f2ce35e5ac877e8265bd93b3e0fbc18 to your computer and use it in GitHub Desktop.
Save vladbatushkov/8f2ce35e5ac877e8265bd93b3e0fbc18 to your computer and use it in GitHub Desktop.
Top 10 talking persons with name starts on A.
// How to works with Date Type here:
// https://neo4j.com/docs/cypher-manual/current/syntax/temporal/#cypher-temporal-accessing-components-temporal-instants
MATCH (p:Person)-[]->(c:Call)
WITH p.number as num, p.name as name, sum(c.duration) as d
WHERE name STARTS WITH "A"
RETURN num, name, d
ORDER BY d DESC
LIMIT 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment