query-a99a2ed8fefae753713ec50aecd15011
Propertiesinstance of (P31)subclass of (P279)named after (P138)country (P17)
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 ?museum ?museumLabel ?countryLabel ?named ?namedLabel ?namedDescription
WHERE {
?museum wdt:P31/wdt:P279* wd:Q33506;
wdt:P138 ?named.
OPTIONAL { ?museum wdt:P17 ?country}
SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en,nl,fr,de,es,pt,bg,be,ru,hu,uk,ja"}
} ORDER BY ?countryLabel ?museumLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?country")
v1("?countryLabel"):::projected
v3("?museum"):::projected
v2("?museumLabel"):::projected
v4("?named"):::projected
a1((" "))
c3(["wd:Q33506"]):::iri
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,mul,en,nl,fr,de,es,pt,bg,be,ru,hu,uk,ja"]):::literal
v3 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v3 --"wdt:P138"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P17".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end