query-9602282e1b55c63c81b31a9b45089539

rq turtle/ttl

No image SELECT distinct ?item ?itemLabel ?npg ?date_of_birth with { select distinct ?item where { { ?item wdt:P39/wdt:P279 wd:Q16707842 . } union { ?item wdt:P39/wdt:P279 wd:Q18018860 . } union { ?item wdt:P39/wdt:P279* wd:Q18015642 . } union { ?item wdt:P1614 ?hop } } } as %i where {include %i filter not exists {?item wdt:P18 [] .} ?item wdt:P1816 ?npg. OPTIONAL { ?item wdt:P569 ?date_of_birth. } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

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#>
# No image
SELECT distinct ?item ?itemLabel ?npg ?date_of_birth where
{
{
  select distinct ?item where {
  {  ?item wdt:P39/wdt:P279* wd:Q16707842 . } union
  {  ?item wdt:P39/wdt:P279* wd:Q18018860 . } union
  {  ?item wdt:P39/wdt:P279* wd:Q18015642 . } union
  {  ?item wdt:P1614 ?hop } }
}  filter not exists {?item wdt:P18 [] .}
  ?item wdt:P1816 ?npg. 
  OPTIONAL { ?item wdt:P569 ?date_of_birth. }
  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; v4("?date_of_birth"):::projected v2("?hop") v1("?item"):::projected v3("?npg"):::projected a1((" ")) a2((" ")) a3((" ")) a4((" ")) c5(["wd:Q18018860"]):::iri c4(["wd:Q16707842"]):::iri c11(["bd:serviceParam"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal c6(["wd:Q18015642"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P18"--> e0a1 e0v1("?item"):::projected e0a1((" ")):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> a1 v1 --"wdt:P18"--> a1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P1614"--> v2 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P39"--> a4 a4 --"wdt:P279"--> c6 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P39"--> a3 a3 --"wdt:P279"--> c5 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P39"--> a2 a2 --"wdt:P279"--> c4 end union0r <== or ==> union0l end v1 --"wdt:P1816"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P569".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end