query-2a50174eebebbc719770f5661dd3a0c6
TODO
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 WHERE {
VALUES ?item {wd:Q14944328 wd:Q2013} #this is the given list. Note that the items start with wd: ... add as many as you want
?item wdt:P31/wdt:P279* wd:Q19729799 . #this requires the item to be an instance of or subclass of the Q19729799 item.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } #this gets labels for values
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
a1((" "))
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c3(["wd:Q19729799"]):::iri
bind0[/VALUES ?item/]
bind0-->v1
bind00(["wd:Q14944328"])
bind00 --> bind0
bind01(["wd:Q2013"])
bind01 --> bind0
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end