query-c81bccaea630f21234060ec32cd6c62a
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". }
}