query-a5ecd600ead59f96e45a9fe83d73cc74
TODO This should also work but times out:
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 ?itemLabel WHERE {
?item ((wdt:P31+)/(wdt:P279*))|(wdt:P279+) ?values
VALUES ?values {
wd:Q169872
wd:Q1441305
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
- https://www.wikidata.org/wiki/User:Iwan.Aucamp/Trash
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/09
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v3("?values")
a1((" "))
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P279"--> v3
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> v3
end
union0r <== or ==> union0l
end
bind0[/VALUES ?values/]
bind0-->v3
bind00(["wd:Q169872"])
bind00 --> bind0
bind01(["wd:Q1441305"])
bind01 --> bind0
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end