query-bf943ee28612e9c6c7f9d6654692195a
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?itemlabel (GROUP_CONCAT(?p31label;SEPARATOR=", ") AS ?p31labels) {
{ ?item wdt:P31/wdt:P279* wd:Q1248784 . ?item p:P31 [ ps:P31 [ rdfs:label ?p31label ] ] FILTER(lang(?p31label)='en') }
MINUS {?item p:P31 [ ps:P31 wd:Q1248784 ] .}
?item rdfs:label ?itemlabel . FILTER(lang(?itemlabel)='en')
}
GROUP BY ?item ?itemlabel
ORDER BY ?itemlabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?item"):::projected
v1("?itemlabel"):::projected
v2("?p31label"):::projected
v4("?p31labels")
a1((" "))
a3((" "))
a2((" "))
a4((" "))
c4(["wd:Q1248784"]):::iri
f0[["?itemlabel = 'en'"]]
f0 --> v1
f1[["?p31label = 'en'"]]
f1 --> v2
v3 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c4
a2 --"rdfs:label"--> v2
a3 --"p:statement/P31"--> a2
v3 --"p:P31"--> a3
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
a4 --"p:statement/P31"--> c4
v3 --"p:P31"--> a4
end
v3 --"rdfs:label"--> v1
bind4[/"?p31label"/]
v2 --o bind4
bind4 --as--o v4