SPARQL is a query language for retrieving and manipulating data stored in RDF format. It is a W3C recommendation similar to SQL for relational databases. SPARQL queries contain SELECT, FROM and WHERE clauses to identify result variables, specify the RDF dataset, and provide a basic graph pattern to match against the data. SPARQL can be used to query RDF knowledge bases and retrieve variable bindings or boolean results. Query results are returned in XML format according to the SPARQL Query Results specification.