query-17767e386bfa656c2d7b083683542138
Wider or narrower results Matching Alternatives. Negation.): UNION), or to include new items (MINUSOver time we will lose interest in some items as well-known, visited or done in any sense. It's time to exclude them (
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#>
#defaultView:ImageGrid
SELECT ?item ?itemLabel ?image ?genreLabel ?movementLabel
WHERE
{
?item wdt:P31/wdt:P279* wd:Q838948 . # works of art
?item wdt:P276 wd:Q19675 . # located in Louvre
# 117 items
MINUS { ?item wdt:P136 wd:Q440928 } # except ONE sculptural genre (Q440928)
# 116 items
MINUS { ?item wdt:P136/wdt:P31/wdt:P279* wd:Q18783400 } # except ANY sculptural genre (Q18783400)
# 113 items
OPTIONAL { ?item wdt:P18 ?image }
OPTIONAL { ?item wdt:P136 ?genre }
OPTIONAL { ?item wdt:P135 ?movement }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?genre")
v2("?image"):::projected
v1("?item"):::projected
v4("?movement")
a1((" "))
a2((" "))
a3((" "))
c3(["wd:Q838948"]):::iri
c8(["wd:Q18783400"]):::iri
c14(["en"]):::literal
c12(["bd:serviceParam"]):::iri
c5(["wd:Q19675"]):::iri
c7(["wd:Q440928"]):::iri
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v1 --"wdt:P276"--> c5
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"wdt:P136"--> c7
end
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v1 --"wdt:P136"--> a2
a2 --"wdt:P31"--> a3
a3 --"wdt:P279"--> c8
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P136".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P135".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end