query-d080337d582f918ca0330700139dd785

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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel (YEAR(?dob) as ?born) (YEAR(?dod) as ?died)
WHERE
{
    ?item wdt:P31 wd:Q5 .
        OPTIONAL { ?item wdt:P569 ?dob }.
        OPTIONAL { ?item wdt:P570 ?dod }.
    ?article schema:about ?item .
    ?article schema:isPartOf <https://he.wikipedia.org/>.
    FILTER((YEAR(?dod) < -100 && YEAR(?dod) > -201)|| (YEAR(?dob) < -100 && YEAR(?dob) > -201))
    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("?article") v5("?born") v6("?died") v2("?dob"):::projected v1("?dod"):::projected v3("?item"):::projected c9([https://he.wikipedia.org/]):::iri c13(["en"]):::literal c11(["bd:serviceParam"]):::iri c4(["wd:Q5"]):::iri f0[["(year-from-dateTime(?dod) < '-100^^xsd:integer'year-from-dateTime(?dod) > '-201^^xsd:integer' || year-from-dateTime(?dob) < '-100^^xsd:integer'year-from-dateTime(?dob) > '-201^^xsd:integer')"]] f0 --> v1 f0 --> v2 v3 --"wdt:P31"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P569".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P570".-> v1 end v4 --"schema:about"--> v3 v4 --"schema:isPartOf"--> c9 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end bind1[/"year-from-dateTime(?dob)"/] v2 --o bind1 bind1 --as--o v5 bind2[/"year-from-dateTime(?dod)"/] v1 --o bind2 bind2 --as--o v6