query-f5c912e6a1f8073e1399c531a4c79639
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#>
SELECT DISTINCT ?item ?itemLabel ?typeLabel ?dedicatee ?dedicateeLabel
WHERE
{
VALUES ?type { wd:Q179700 wd:Q4989906 }
?item wdt:P31 ?type .
?item wdt:P825 ?dedicatee .
?item wdt:P276 ? / wdt:P131? / wdt:P17 wd:Q38 . # Location? / administrative unit? / country Italy
?dedicatee wdt:P21 wd:Q6581072 .
MINUS { ?item wd:P195 ?collection . } # Not in a collection (museum or other)
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;
v4("?collection")
v3("?dedicatee"):::projected
v2("?item"):::projected
v1("?type")
a1((" "))
a2((" "))
c8(["wd:Q6581072"]):::iri
c6(["wd:Q38"]):::iri
c11(["bd:serviceParam"]):::iri
c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?type/]
bind0-->v1
bind00(["wd:Q179700"])
bind00 --> bind0
bind01(["wd:Q4989906"])
bind01 --> bind0
v2 --"wdt:P31"--> v1
v2 --"wdt:P825"--> v3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P276"--> a1
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
end
union0r <== or ==> union0l
end
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P131"--> a2
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
end
union1r <== or ==> union1l
end
a2 --"wdt:P17"--> c6
v3 --"wdt:P21"--> c8
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v2 --"wd:P195"--> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end