SPARQL (pronounced "sparkle", a recursive acronym for SPARQL Protocol and RDF Query Language) is an RDF query language, that is, a semantic query language for databases, able to retrieve and manipulate data stored in Resource Description Framework (RDF) format
A SPARQL query example that models the question "What are all the country capitals in Africa?":
PREFIX ex: <http://example.com/exampleOntology#>
SELECT ?capital ?country
WHERE {
?x ex:cityname ?capital ;
ex:isCapitalOf ?y .
?y ex:countryname ?country ;
ex:isInContinent ex:Africa .
}