query-12e2fbf864ebd7d662c69da842153069
Propertiesinstance of (P31)subclass of (P279)
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 ?item ?itemLabel ?item2 ?item2Label
WHERE
{
VALUES ?item2 { wd:Q23444 } .
?item (wdt:P31|wdt:P279) ?item2.
?item wdt:P31 wd:Q1075
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;
v2("?item"):::projected
v1("?item2"):::projected
c5(["bd:serviceParam"]):::iri
c3(["wd:Q1075"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?item2/]
bind0-->v1
bind00(["wd:Q23444"])
bind00 --> bind0
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P279"--> v1
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> v1
end
union0r <== or ==> union0l
end
v2 --"wdt:P31"--> c3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end