query-cc3ae4abcd0f52d6b769d6cbc4c0743e
More complex matching in simpler queries works as expected. MINUS while using Q136775 and lots of items showed up that match the exclusion criterium like e.g. MINUSI tried to match items that have a license that is an instance of a free software license. I thought my solution worked until i tried to exclude stuff using
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?item WHERE {
?item wdt:P275 ?license.
?license wdt:P31 ?subclass.
?subclass wdt:P279 wd:Q1156659.
MINUS { ?item wdt:P31 wd:Q341. }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?license")
v3("?subclass")
c4(["wd:Q1156659"]):::iri
c5(["wd:Q341"]):::iri
v1 --"wdt:P275"--> v2
v2 --"wdt:P31"--> v3
v3 --"wdt:P279"--> c4
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"wdt:P31"--> c5
end