query-e541cbe05cf7814d1b7fb24d8863e838

rq turtle/ttl

TODO

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?person ?personLabel ?residence ?residenceLabel ?residencePointInTime ?reference
WHERE {
  ?person wdt:P31 wd:Q5 .
  ?person wdt:P27 wd:Q20 .
  ?person wdt:P569 ?birth .
  ?person wdt:P570 ?death .

  OPTIONAL {
    ?person p:P551 ?residenceStatement .
    ?residenceStatement ps:P551 ?residence .

    OPTIONAL { ?residenceStatement pq:P585 ?residencePointInTime . }
    OPTIONAL { ?residenceStatement prov:wasDerivedFrom ?reference . }
  }

  FILTER (?birth < "1802-01-01"^^xsd:date && ?death >= "1802-01-01"^^xsd:dat)

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?birth") v2("?death") v3("?person"):::projected v7("?reference"):::projected v5("?residence"):::projected v6("?residencePointInTime"):::projected v4("?residenceStatement") c6(["wd:Q20"]):::iri c14(["bd:serviceParam"]):::iri c4(["wd:Q5"]):::iri c16(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?birth < '1802-01-01^^xsd:date'?death >= s1802-01-01^^<http://www.w3.org/2001/XMLSchema#dat>'"]] f0 --> v1 f0 --> v2 v3 --"p:direct/P31"--> c4 v3 --"p:direct/P27"--> c6 v3 --"p:direct/P569"--> v1 v3 --"p:direct/P570"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:P551".-> v4 v4 --"p:statement/P551"--> v5 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:qualifier/P585".-> v6 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v4 -."prov:wasDerivedFrom".-> v7 end end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c14 --"wikibase:language"--> c16 end