Universiteit Leiden

SPARQL Exercises

Exercise 1

The SPARQL endpoint for the STCN database is available at http://openvirtuoso.kbresearch.nl/sparql. Experiment with the SPARQL queries given below. What type of data do these queries return?

SELECT * WHERE { ?b dc:type schema:Book . ?b dc:date ?d . 
FILTER ( ?d = "1500" ) } 

SELECT * WHERE { 
?b dc:type schema:Book . 
?b dc:title ?t . 
?b dc:date ?d . 
FILTER ( ?d = "1600" ) } 

SELECT * WHERE 
{ 
?b dc:type schema:Book . 
?b dc:publisher ?p . 
?p skos:prefLabel ?publ . 
FILTER ( contains( ?publ , "Elzevier" ) ) } 


SELECT * WHERE 
{ 
?b dc:type schema:Book . 
?b dc:date ?d . 
?b dc:subject ?s .
?b dc:language ?l . 
?s skos:prefLabel ?sl . 
FILTER ( ?d = "1650" ) }