query-92c2d5a2fff775827966fde8c96bde17

rq turtle/ttl

List of enslaved people with date and place of birth SELECT ?enslavedPerson ?enslavedPersonLabel ?dateOfBirth ?placeOfBirth ?placeOfBirthLabel WHERE { ?enslavedPerson wdt:P31 wd:Q5; # Instance of human being... wdt:P3716 wd:Q12773225. # ...whose social status is "slave" OPTIONAL { ?enslavedPerson wdt:P569 ?dateOfBirth ; # Look for date of birth... wdt:P19 ?placeOfBirth. # ...and place of birth }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY DESC(?dateOfBirth) # Show by descending date of birth

ORDER BY ASC(?esclavoLabel) # Uncomment if you want to show the query by name of the person in alphabetical order

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# List of enslaved people with date and place of birth
SELECT ?enslavedPerson ?enslavedPersonLabel ?dateOfBirth ?placeOfBirth ?placeOfBirthLabel
WHERE
{
  ?enslavedPerson wdt:P31 wd:Q5;  # Instance of human being...
                  wdt:P3716 wd:Q12773225.  # ...whose social status is "slave"
  OPTIONAL {
  ?enslavedPerson wdt:P569 ?dateOfBirth ;  # Look for date of birth...
                  wdt:P19 ?placeOfBirth.  # ...and place of birth
  }           
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?dateOfBirth)  # Show by descending date of birth
# ORDER BY ASC(?esclavoLabel)  # Uncomment if you want to show the query by name of the person in alphabetical order

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?dateOfBirth"):::projected v2("?enslavedPerson"):::projected v3("?placeOfBirth"):::projected c8(["bd:serviceParam"]):::iri c4(["wd:Q12773225"]):::iri c2(["wd:Q5"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P31"--> c2 v2 --"wdt:P3716"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P569".-> v1 v2 --"wdt:P19"--> v3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end