query-4c13c68e1b4b2fd01c976c5ec06a5182
Incomplete dataMissing P155 or P156:
Use at
- https://query.wikidata.org/sparql
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#>
SELECT DISTINCT ?item ?missing ?value ?itemLabel ?valueLabel WHERE {
BIND(wdt:P155 AS ?missing) .
BIND(IF(?missing=wdt:P155, wdt:P156, wdt:P155) AS ?existing) .
?value ?existing ?item; wdt:P361/wdt:P361/wdt:P31/wdt:P279* wd:Q5389; wdt:P31 wd:Q18536594 .
?item wdt:P361/wdt:P361/wdt:P31/wdt:P279* wd:Q5389; wdt:P31 wd:Q18536594 .
MINUS { ?item ?missing ?value }
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;
v2("?existing")
v4("?item"):::projected
v1("?missing"):::projected
v3("?value"):::projected
a1((" "))
a2((" "))
a3((" "))
a4((" "))
a5((" "))
a6((" "))
c7(["bd:serviceParam"]):::iri
c5(["wd:Q18536594"]):::iri
c4(["wd:Q5389"]):::iri
c9(["en"]):::literal
bind0[/"'wdt:P155'"/]
bind0 --as--o v1
bind1[/"if(?missing = 'wdt:P155','wdt:P156','wdt:P155')"/]
v1 --o bind1
bind1 --as--o v2
v3 -->v2--> v4
v3 --"wdt:P361"--> a1
a1 --"wdt:P361"--> a2
a2 --"wdt:P31"--> a3
a3 --"wdt:P279"--> c4
v3 --"wdt:P31"--> c5
v4 --"wdt:P361"--> a4
a4 --"wdt:P361"--> a5
a5 --"wdt:P31"--> a6
a6 --"wdt:P279"--> c4
v4 --"wdt:P31"--> c5
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v4 -->v1--> v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end