1. Home
  2. /
  3. Cypher Typing Test
  4. /
  5. Basic Cypher Queries

Basic Cypher Queries - Cypher Typing CST Test

Skip to main content
CodeSpeedTest
Languages
Start TypingJump into a test — pick any languageAdaptive TrainingUnlock chars as you master themPractice DrillsFocused sessions targeting weak spotsDaily ChallengesNew coding challenges every dayRace ModeCompete against others in real timeAI OpponentRace against an AI at your WPM levelTournamentsLive coding speed tournamentsArcade GamesZType, Overkill Survival, Glyphica & moreGamificationXP, coins, badges & quests
LeaderboardGlobal rankings for every languageCertificatesEarn verifiable Bronze / Silver / Gold certsActivityDaily streaks & historical analyticsProfileYour stats, badges & achievements
Browse Languages500+ languages with real code examplesBlogTips, guides & deep divesFree ToolsWPM calculator, typing speed report & moreFAQCommon questions answeredGetting StartedNew to CodeSpeedTest?AboutOur story & missionSupportGet help — Pro users get priorityContactGet in touch with the team
Pricing
Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
CodeSpeedTest

Improve your coding speed, code accuracy, and programming syntax WPM with practice sessions across 500+ programming languages.

Quick Links

HomeAboutFeaturesGetting StartedLanguages

Legal & Support

Pro ⚡ PricingContactPrivacy PolicyTerms of Service

Connect

CodeSpeedTest on GitHubCodeSpeedTest on TwitterEmail CodeSpeedTest

© 2026 CodeSpeedTest. All rights reserved.

Basic Cypher Queries — Cypher Code

Creating nodes and relationships, then querying them in Neo4j using Cypher.

CREATE (a:Person {name: "Alice"})
CREATE (b:Person {name: "Bob"})
CREATE (a)-[:FRIEND]->(b);

MATCH (p:Person)-[:FRIEND]->(f)
RETURN p.name, f.name;

Cypher Language Guide

Cypher is Neo4j’s declarative graph query language designed for creating, querying, and manipulating graph data structures. It uses ASCII-art-like pattern matching to express complex graph relationships intuitively.

Primary Use Cases

  • ▸Graph traversal and pathfinding
  • ▸Recommendation systems
  • ▸Social network analysis
  • ▸Fraud detection and link analysis
  • ▸Knowledge graphs and semantic search
  • ▸Network and IT infrastructure mapping

Notable Features

  • ▸Pattern-matching syntax for graph queries
  • ▸Variable-length path traversals
  • ▸Shortest-path algorithms
  • ▸Constraints and schema definitions
  • ▸Native graph manipulation (CREATE, MERGE)
  • ▸Integration with APOC graph procedures

Origin & Creator

Developed by Neo4j Inc. in 2011 as the primary query language for graph databases; later adopted under open standards via the openCypher project.

Industrial Note

Cypher dominates industries where relationships are more important than tabular rows: fraud graphs, financial link analysis, logistics routing, recommendation engines, social networks, cybersecurity threat graphs, and semantic knowledge graphs.

Quick Explain

  • ▸Cypher excels at querying highly connected data using patterns instead of joins.
  • ▸Ideal for graph use cases like recommendations, social networks, fraud detection, and knowledge graphs.
  • ▸Supports MATCH patterns, variable-length traversals, shortest path queries, constraints, and graph algorithms.

Core Features

  • ▸MATCH, CREATE, MERGE, DELETE
  • ▸Graph pattern matching
  • ▸Property filtering
  • ▸Path traversals
  • ▸Aggregation and ordering
  • ▸Constraints (UNIQUE, EXISTS)

Learning Path

  • ▸Learn graph modeling basics
  • ▸Understand nodes, relationships, properties
  • ▸Learn MATCH, CREATE, MERGE
  • ▸Master pathfinding and graph patterns
  • ▸Learn optimization and indexing

Practical Examples

  • ▸Find friends-of-friends relationships
  • ▸Create user and purchase graph
  • ▸Shortest path between two nodes
  • ▸PageRank on user graph
  • ▸Detect fraud rings via pattern match

Comparisons

  • ▸More expressive than SQL for graph queries
  • ▸Simpler than Gremlin for beginners
  • ▸More user-friendly than SPARQL for non-semantic graphs
  • ▸Better tooling and ecosystem for visualization

Strengths

  • ▸Intuitive pattern-based syntax
  • ▸High performance for relationship-heavy queries
  • ▸Strong ecosystem (APOC, GDS library)
  • ▸Excellent visualization in Neo4j Browser
  • ▸Supports complex graph analytics

Limitations

  • ▸Not ideal for massive tabular datasets
  • ▸Requires graph modeling expertise
  • ▸Performance depends on proper indexing
  • ▸Limited JOIN-like operations outside graph context

When NOT to Use

  • ▸Pure tabular data with few relationships
  • ▸OLAP warehouse-style reporting
  • ▸Highly write-heavy workloads without batching
  • ▸Datasets requiring strict ACID with cross-shard transactions

Cheat Sheet

  • ▸MATCH (n)-[:TYPE]->(m)
  • ▸CREATE vs MERGE
  • ▸Shortest path: shortestPath()
  • ▸Filtering with WHERE
  • ▸Relationship direction -> performance boost

FAQ

  • ▸Is Cypher like SQL?
  • ▸Cypher is declarative like SQL but optimized for graph relationships.
  • ▸Does Cypher support JOINs?
  • ▸Relationships replace JOINs in Cypher queries.
  • ▸Is Cypher hard to learn?
  • ▸No - very intuitive due to pattern syntax.
  • ▸Why use Cypher?
  • ▸To analyze connected data with powerful pattern queries.

30-Day Skill Plan

  • ▸Week 1: Cypher basics
  • ▸Week 2: MERGE, constraints, pattern matching
  • ▸Week 3: Graph algorithms
  • ▸Week 4: Cluster scaling, indexing, optimization

Final Summary

  • ▸Cypher is Neo4j’s powerful, intuitive graph query language.
  • ▸Ideal for connection-heavy data and real-time graph analytics.
  • ▸Used in fraud detection, recommendations, and knowledge graphs.
  • ▸Supports pattern matching, graph manipulation, and graph algorithms.

Project Structure

  • ▸Node labels & relationship types
  • ▸Indexes and constraints
  • ▸APOC utilities
  • ▸Stored procedures and triggers
  • ▸Graph algorithms pipelines

Monetization

  • ▸Graph engineering roles
  • ▸Consulting for fraud/recommendation systems
  • ▸Building knowledge graph solutions
  • ▸Graph analytics for enterprises

Productivity Tips

  • ▸Use PROFILE for optimization
  • ▸Leverage APOC utilities
  • ▸Index entry nodes properly
  • ▸Pre-create graph projections for GDS

Basic Concepts

  • ▸Nodes, Relationships, Properties
  • ▸Labels and relationship types
  • ▸MATCH patterns
  • ▸CREATE, MERGE for graph updates
  • ▸Constraints (UNIQUE, EXISTS)
  • ▸Pathfinding queries

Official Docs

  • ▸Neo4j Cypher Reference
  • ▸openCypher Documentation
  • ▸APOC and GDS Manuals

More Cypher Typing Exercises

Advanced Cypher FilteringNeo4j AggregationNeo4j Path MatchingNeo4j Create With PropertiesNeo4j Relationship PropertiesNeo4j Delete NodesNeo4j IndexesNeo4j ConstraintsNeo4j Full-Text Search

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlGremlin