query-14d89dc6d875995096ba2207a7dc4210
Loop? I can get the the desired list of museums with this query: all the objects (artworks, artefacts and everything else) within these museums, all in one list.and What I am looking for is a query that lists all museums of a given country Hi! This may be a very simple problem for those who are not complete newbies to SPARQL like me.
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?item WHERE
{
?item wdt:P31/wdt:P279* wd:Q33506;
wdt:P17 wd:Q40.
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
a1((" "))
c3(["wd:Q33506"]):::iri
c5(["wd:Q40"]):::iri
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v1 --"wdt:P17"--> c5