query-0dce312c31d6d577266a81d6a66c5928
The query should probably be changed to something like
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?instance ?instanceLabel
WHERE
{
{
SELECT DISTINCT ?item ?instance {
?item wdt:P382 [] .
MINUS {
VALUES ?classes { wd:Q2039348 wd:Q3648563 } .
?item p:P31/ps:P31/wdt:P279* ?classes .
} .
OPTIONAL {
?item wdt:P31 ?instance .
} .
} LIMIT 100
} .
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;
v2("?classes")
v3("?instance"):::projected
v1("?item"):::projected
a1((" "))
a2((" "))
a3((" "))
c7(["bd:serviceParam"]):::iri
c9(["en"]):::literal
v1 --"p:direct/P382"--> a1
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
bind1[/VALUES ?classes/]
bind1-->v2
bind10(["wd:Q2039348"])
bind10 --> bind1
bind11(["wd:Q3648563"])
bind11 --> bind1
v1 --"p:P31"--> a2
a2 --"p:statement/P31"--> a3
a3 --"p:direct/P279"--> v2
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P31".-> v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end