query-75dc0d28d8cdacf8b16df05d7df462d6
All articles of a specific Wikipedia with their QIDs and current sitelinks 19:49, 16 February 2021 (UTC)) talk (AramHello everyone, I want a query to obtain all articles (no redirect pages) of ckbwiki with their QID and current sitelinks. Thanks, : : something like this ? I don’t know if the redirects are correctly handled. It’s suppose to use the redirect badges but I don’t know if this is up to date yet. Aram@
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
select distinct ?item ?article ?name {
?article schema:isPartOf <https://ckb.wikipedia.org/> ; schema:about ?item ; schema:name ?name
minus {
?article schema:isPartOf <https://ckb.wikipedia.org/> ; wikibase:badge ?badge .
values ?badge { wd:Q70893996 wd:Q70894304}
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?article"):::projected
v5("?badge")
v2("?item"):::projected
v3("?name"):::projected
c2([https://ckb.wikipedia.org/]):::iri
v1 --"schema:isPartOf"--> c2
v1 --"schema:about"--> v2
v1 --"schema:name"--> v3
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"schema:isPartOf"--> c2
v1 --"wikibase:badge"--> v5
bind1[/VALUES ?badge/]
bind1-->v5
bind10(["wd:Q70893996"])
bind10 --> bind1
bind11(["wd:Q70894304"])
bind11 --> bind1
end