query-c6e99e7d467be82c46ad5facc1bedb08
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#>
#title:Paintings once owned by Red Flag Names
#defaultView:ImageGrid
SELECT DISTINCT ?pic ?painting ?paintingLabel ?location ?locationLabel
WHERE
{
?painting wdt:P31 wd:Q3305213; #painting
wdt:P127 [ wdt:P1840 wd:Q30335959 ]. #the painting is owned by someone who is a red flag name
OPTIONAL {?painting wdt:P276 ?location.}
?painting wdt:P18 ?pic.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?location"):::projected
v1("?painting"):::projected
v3("?pic"):::projected
a1((" "))
c2(["wd:Q3305213"]):::iri
c4(["wd:Q30335959"]):::iri
c9(["bd:serviceParam"]):::iri
c11(["#91;AUTO_LANGUAGE#93;"]):::literal
v1 --"wdt:P31"--> c2
a1 --"wdt:P1840"--> c4
v1 --"wdt:P127"--> a1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P276".-> v2
end
v1 --"wdt:P18"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end