query-3aa28fd922d701722f1961247408e6c2
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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?p31 ?p31Label (COUNT(?item) AS ?count) WHERE
{
?item p:P1661 [] .
OPTIONAL { ?item wdt:P31 ?p31 . }
MINUS { ?item wdt:P31/wdt:P279* wd:Q35127 }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de,fr". }
}
GROUP BY ?p31 ?p31Label
ORDER BY DESC(?count) ?p31Label
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count")
v3("?item"):::projected
v4("?p31"):::projected
v2("?p31Label"):::projected
a1((" "))
a2((" "))
c6(["bd:serviceParam"]):::iri
c4(["wd:Q35127"]):::iri
c8(["en,de,fr"]):::literal
v3 --"p:P1661"--> a1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P31".-> v4
end
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v3 --"p:direct/P31"--> a2
a2 --"p:direct/P279"--> c4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind2[/"count(?item)"/]
v3 --o bind2
bind2 --as--o v5