query-f209f827e2aeb44fa8943961da8a6418
Verwijst naar de clause VALUES. SELECT ?image ?speciesLabel ?mayorLabel ?placeLabel WHERE { VALUES ?species {wd:Q144 wd:Q146 wd:Q780} ?mayor wdt:P31 ?species . ?mayor p:P39 ?node . ?node ps:P39 wd:Q30185 . ?node pq:P642 ?place . OPTIONAL {?mayor wdt:P18 ?image} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". } }
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Verwijst naar de clause VALUES.
SELECT ?image ?speciesLabel ?mayorLabel ?placeLabel WHERE {
VALUES ?species {wd:Q144 wd:Q146 wd:Q780}
?mayor wdt:P31 ?species .
?mayor p:P39 ?node .
?node ps:P39 wd:Q30185 .
?node pq:P642 ?place .
OPTIONAL {?mayor wdt:P18 ?image}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?image"):::projected
v2("?mayor")
v3("?node")
v4("?place")
v1("?species")
c8(["bd:serviceParam"]):::iri
c4(["wd:Q30185"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal
bind0[/VALUES ?species/]
bind0-->v1
bind00(["wd:Q144"])
bind00 --> bind0
bind01(["wd:Q146"])
bind01 --> bind0
bind02(["wd:Q780"])
bind02 --> bind0
v2 --"p:direct/P31"--> v1
v2 --"p:P39"--> v3
v3 --"p:statement/P39"--> c4
v3 --"p:qualifier/P642"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P18".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end