Created
June 28, 2016 06:50
Generating SPARQL: example query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX dbo: <http://dbpedia.org/ontology/> | |
PREFIX foaf: <http://xmlns.com/foaf/0.1/> | |
SELECT ?person | |
(SAMPLE(?_name) AS ?name) | |
(SAMPLE(?_birthDate) AS ?birthDate) | |
(SAMPLE(?_deathDate) AS ?deathDate) | |
WHERE { | |
{ | |
SELECT ?person | |
WHERE { | |
{ | |
SELECT DISTINCT ?person | |
WHERE { | |
?person a foaf:Person ; | |
foaf:name [] ; | |
dbo:birthDate [] . | |
} | |
ORDER BY ?person | |
} | |
} | |
LIMIT 10000 | |
OFFSET 0 | |
} | |
?person foaf:name ?_name ; | |
dbo:birthDate ?_birthDate . | |
OPTIONAL { | |
?person dbo:deathDate ?_deathDate . | |
} | |
} | |
GROUP BY ?person |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment