query-e5201407b69d425bd1451a8482284b48

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel WHERE {
    ?item wdt:P39/wdt:P279* wd:Q116;
          wdt:P569 ?dateofbirth;
          wdt:P570 ?dateofdeath.
    FILTER(year(?dateofbirth) < 0)
    FILTER(year(?dateofdeath) > 0)
    {?item wdt:P20 ?place} union {?item wdt:P19 ?place}
    ?place p:P625/psv:P625/wikibase:geoLatitude ?lat .
    wd:Q5776 p:P625/psv:P625/wikibase:geoLatitude ?latBe .
    FILTER(?lat > ?latBe)
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?dateofbirth") v3("?dateofdeath") v5("?item"):::projected v1("?lat") v2("?latBe") v6("?place") a1((" ")) a2((" ")) a3((" ")) a4((" ")) a5((" ")) c16(["en"]):::literal c4(["wd:Q116"]):::iri c14(["bd:serviceParam"]):::iri c12(["wd:Q5776"]):::iri f0[["?lat > ?latBe"]] f0 --> v1 f0 --> v2 f1[["year-from-dateTime(?dateofdeath) > '0^^xsd:integer'"]] f1 --> v3 f2[["year-from-dateTime(?dateofbirth) < '0^^xsd:integer'"]] f2 --> v4 v5 --"p:direct/P39"--> a1 a1 --"p:direct/P279"--> c4 v5 --"p:direct/P569"--> v4 v5 --"p:direct/P570"--> v3 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v5 --"p:direct/P19"--> v6 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v5 --"p:direct/P20"--> v6 end union0r <== or ==> union0l end v6 --"p:P625"--> a2 a2 --"p:statement/value/P625"--> a3 a3 --"wikibase:geoLatitude"--> v1 c12 --"p:P625"--> a4 a4 --"p:statement/value/P625"--> a5 a5 --"wikibase:geoLatitude"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c14 --"wikibase:language"--> c16 end