query-e93f25d53dde2abd303cbe9fc889e255
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/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?article_name ?enwiki (COUNT(?wpSitelink) as ?sitelinks) WHERE {
?item wdt:P1435 wd:Q9259 .
optional {?wpSitelink schema:about ?item . ?wpSitelink schema:isPartOf [ wikibase:wikiGroup "wikipedia" ] .}
filter not exists { ?lvwiki schema:about ?item; schema:isPartOf <https://lv.wikipedia.org/> .}
optional {?enwiki schema:about ?item; schema:isPartOf <https://en.wikipedia.org/> . ?enwiki schema:name ?article_name }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de,fr,pl,ru" }
}
group by ?item ?itemLabel ?article_name ?enwiki
ORDER BY DESC(?sitelinks)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?article_name"):::projected
v5("?enwiki"):::projected
v3("?item"):::projected
v2("?lvwiki")
v7("?sitelinks")
v4("?wpSitelink"):::projected
a1((" "))
c3([https://lv.wikipedia.org/]):::iri
c13(["en,de,fr,pl,ru"]):::literal
c8([https://en.wikipedia.org/]):::iri
c11(["bd:serviceParam"]):::iri
c7(["wikipedia"]):::literal
c5(["wd:Q9259"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"schema:about"--> e0v2
e0v1 --"schema:isPartOf"--> e0c3
e0v2("?item"):::projected
e0v1("?lvwiki"):::projected
e0c3([https://lv.wikipedia.org/]):::iri
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> v3
f0 --> c2
f0 --> c3
v2 --"schema:about"--> v3
v2 --"schema:isPartOf"--> c3
v3 --"wdt:P1435"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."schema:about".-> v3
a1 --"wikibase:wikiGroup"--> c7
v4 --"schema:isPartOf"--> a1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."schema:about".-> v3
v5 --"schema:isPartOf"--> c8
v5 --"schema:name"--> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end
bind2[/"count(?wpSitelink)"/]
v4 --o bind2
bind2 --as--o v7