query-eda1ad212e954a0b5dc9f97272ee1536
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 schema: <http://schema.org/>
SELECT DISTINCT ?item ?n (COUNT(DISTINCT ?article2) AS ?num) (?n - ?num AS ?difference)
WHERE {
?item wdt:P31/wdt:P279* wd:Q486972 ; wdt:P131* wd:Q16245 ; wikibase:sitelinks ?n .
MINUS { ?item wdt:P31 wd:Q747074 } .
MINUS { ?item wdt:P31 wd:Q954172 } .
?article schema:about ?item .
OPTIONAL { ?article2 schema:about ?item ; schema:isPartOf ?w .
VALUES ?w { <https://ceb.wikipedia.org/> <https://sh.wikipedia.org/> <https://sr.wikipedia.org/> } . }
}
GROUP BY ?item ?n
ORDER BY DESC(?n)
Query found at
- https://www.wikidata.org/wiki/User:Ep%C3%ACdosis/Queries
- https://www.wikidata.org/wiki/User:Ep%C3%ACdosis/sandbox
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?article")
v4("?article2"):::projected
v7("?difference")
v2("?item"):::projected
v1("?n"):::projected
v6("?num"):::projected
v6("?w")
a1((" "))
c3(["wd:Q486972"]):::iri
c8(["wd:Q954172"]):::iri
c5(["wd:Q16245"]):::iri
c7(["wd:Q747074"]):::iri
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v2 --"wdt:P131"--> c5
v2 --"wikibase:sitelinks"--> v1
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v2 --"wdt:P31"--> c7
end
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v2 --"wdt:P31"--> c8
end
v3 --"schema:about"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."schema:about".-> v2
v4 --"schema:isPartOf"--> v6
bind2[/VALUES ?w/]
bind2-->v6
bind20([https://ceb.wikipedia.org/])
bind20 --> bind2
bind21([https://sh.wikipedia.org/])
bind21 --> bind2
bind22([https://sr.wikipedia.org/])
bind22 --> bind2
end
bind4[/"count(?article2)"/]
v4 --o bind4
bind4 --as--o v6
bind5[/"?n - ?num"/]
v1 --o bind5
v6 --o bind5
bind5 --as--o v7