๐๏ธ SPARQL Query Builder
Build SPARQL queries step by step. Add triple patterns, filters, and modifiers to construct a complete query.
Lecture 6 Interactive Learning Companion
Explore SPARQL 1.1 features interactively. Select a category to see syntax, semantics, and examples.
Build SPARQL queries step by step. Add triple patterns, filters, and modifiers to construct a complete query.
Write SPARQL queries against a sample RDF dataset and see the results. The dataset is a small university ontology.
Watch step-by-step how a SPARQL engine evaluates a query: from parsing to pattern matching to results.
Select a scenario above
Test your knowledge of SPARQL query language, patterns, operators, and semantics!
Press "Start Game" to begin!
Test your understanding of SPARQL: query forms, graph patterns, operators, aggregation, and federation!
Quick reference for SPARQL query forms, operators, functions, property paths, and aggregation.
SELECT DISTINCT ?name ?age
WHERE { ?p ex:name ?name . ?p ex:age ?age }
ORDER BY ?name LIMIT 10 OFFSET 5FILTER (?age > 18)
FILTER (LANG(?name) = "en")
FILTER REGEX(?name, "^Ali", "i")
FILTER (BOUND(?email))
FILTER (isIRI(?x) || isLiteral(?x))
FILTER (CONTAINS(?name, "Alice"))
FILTER (STRSTARTS(?uri, "http://"))
FILTER (?date > "2024-01-01"^^xsd:date)p/q โ Sequence (p then q)
p|q โ Alternative (p or q)
p* โ Zero or more (transitive closure)
p+ โ One or more
p? โ Zero or one
^p โ Inverse (follow backwards)
!(p) โ Negated (any property except p)
(p/q)* โ Grouped with repetitionSELECT ?dept (COUNT(?p) AS ?cnt)
WHERE { ?p ex:worksIn ?dept }
GROUP BY ?dept
HAVING (COUNT(?p) > 5)
ORDER BY DESC(?cnt)