query-a3f4a1c5742c354554e8ac31b4b5ab1d

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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?dob ?dobLabel ?histreg ?histregLabel WHERE {
 {
   SELECT DISTINCT ?item ?dob ?histreg WHERE {
     ?item p:P27 ?statement0.
     ?statement0 (ps:P27/(wdt:P279*)) wd:Q20.
     ?item p:P21 ?statement1.
     ?statement1 (ps:P21/(wdt:P279*)) wd:Q6581072.
     ?item p:P569 ?statement_2.
     ?statement_2 psv:P569 ?statementValue_2.
     ?statementValue_2 wikibase:timeValue ?P569_2.
     ?item p:P4574 ?statement3.
     ?statement3 (ps:P4574) _:anyValueP4574.
     MINUS {
       ?item p:P19 ?statement4.
       ?statement4 (ps:P19/(wdt:P279*)) _:anyValueP19.
     }
     OPTIONAL { ?item wdt:P569 ?dob } 
     OPTIONAL { ?item wdt:P4574 ?histreg }
#     SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],nn,nb,en,sv,fi". }  
   }
   LIMIT 10000
 }
 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?P569_2") v9("?dob"):::projected v10("?histreg"):::projected v1("?item"):::projected v2("?statement0") v3("?statement1") v7("?statement3") v8("?statement4") v5("?statementValue_2") v4("?statement_2") a3((" ")) a5((" ")) a1((" ")) a2((" ")) a4((" ")) c4(["wd:Q20"]):::iri c7(["wd:Q6581072"]):::iri c18(["bd:serviceParam"]):::iri c20(["#91;AUTO_LANGUAGE#93;"]):::literal v1 --"p:P27"--> v2 v2 --"p:statement/P27"--> a1 a1 --"p:direct/P279"--> c4 v1 --"p:P21"--> v3 v3 --"p:statement/P21"--> a2 a2 --"p:direct/P279"--> c7 v1 --"p:P569"--> v4 v4 --"p:statement/value/P569"--> v5 v5 --"wikibase:timeValue"--> v6 v1 --"p:P4574"--> v7 v7 --"p:statement/P4574"--> a3 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"p:P19"--> v8 v8 --"p:statement/P19"--> a4 a4 --"p:direct/P279"--> a5 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P569".-> v9 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P4574".-> v10 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c18 --"wikibase:language"--> c20 end