query-d1171bd13bcbeeb70f2a770fd7ebac00
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 ?label ?image WHERE {
values ?thing {wd:Q31807746 wd:Q212920} #add more things here
?item wdt:P279* ?thing. #each item in the VALUES array is matched in this statement
optional {?item wdt:P18 ?image.} #get image if there is one
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;
v3("?image"):::projected
v2("?item"):::projected
v1("?thing")
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?thing/]
bind0-->v1
bind00(["wd:Q31807746"])
bind00 --> bind0
bind01(["wd:Q212920"])
bind01 --> bind0
v2 --"wdt:P279"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P18".-> v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end