beginnerNeo4j — Graph Database & Cypher Queries

What is Cypher and how does it query graphs?

Cypher is Neo4j's declarative graph query language. It uses ASCII-art notation to express graph patterns. Key syntax: (node) represents a node. -[:RELATIONSHIP]-> represents a directed relationship. (a)-[:KNOWS]->(b) matches node a connected to node b via KNOWS relationship. Filtering: WHERE a.age > 25. Variable hop: -[:KNOWS*2..4]-> matches 2 to 4 hops. Pattern: MATCH (alice:Person {name:'Alice'}

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to Your fraud detection team wants to identify accounts that are part of a ring of money transfers (circular transactions). How do you implement this in Neo4j?← Back to all NoSQL questions