query-afaa841faba19675ddeedfebd2328fa6
Propertiesinstance of (P31)subclass of (P279)creator (P170)location (P276)
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 DISTINCT ?item ?itemLabel ?location ?locationLabel ?creator ?creatorLabel
WHERE { ?item (wdt:P31/wdt:P279*) wd:Q4502142 .
#using broader "visual artwork" here and both "instance of" and "subclass of" to include paintings/prints etc
?item wdt:P170 wd:Q150679 . #creator is Anthony Van Dyck
?item wdt:P276 ?location . #define location
?item wdt:P170 ?creator . #define creator
FILTER ( ?location = wd:Q190804 || ?location = wd:Q19675 ) #location defined earlier is either...
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("?creator"):::projected
v2("?item"):::projected
v1("?location"):::projected
a1((" "))
c10(["bd:serviceParam"]):::iri
c7(["wd:Q150679"]):::iri
c5(["wd:Q4502142"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["(?location = 'wd:Q190804' || ?location = 'wd:Q19675')"]]
f0 --> v1
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c5
v2 --"wdt:P170"--> c7
v2 --"wdt:P276"--> v1
v2 --"wdt:P170"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end