Skip to content

SPARQL: Query Language for RDF

On this page

Resources

Specs

In Semantic Web

  • SPARQL is to RDF what Cypher is to property graphs. For the comparison, see The Graph Space.

  • SPARQL queries pattern-match on triples, while Cypher pattern-matches on nodes and relationships. Structurally similar, but SPARQL has built-in support for reasoning (if the triple store supports inference).

Live Playgrounds

Tutorials

  • Apache Jena SPARQL Tutorial - Fast, practical course. Covers SELECT, FILTER, OPTIONAL, UNION with runnable examples.

  • SPARQL.dev - Cheat sheet / quick reference. Good for looking up syntax while writing queries.

  • Wikidata SPARQL Tutorial - Learn by querying real data (Wikidata). The most motivating way to learn.