AramBot
Joined 14 May 2020
![]() |
This user account is a bot with a bot flag. The bot is operated by Aram. |
Queries
editHere are the queries I'm using. I will give credit to others.
Central Kurdish Wikipedia pages missing labels on Wikidata
editSELECT DISTINCT ?item ?articleLabel
WHERE {
?article schema:about ?item ;
schema:inLanguage "ckb" ;
schema:isPartOf <https://ckb.wikipedia.org/> ;
schema:name ?articleLabel .
FILTER NOT EXISTS {
?item rdfs:label ?label .
FILTER (lang(?label) = "ckb")
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "ckb". }
}
All cities in Iran not yet created on Central Kurdish Wikipedia
editSELECT ?city ?cityLabel
WHERE {
?city wdt:P31 wd:Q56557504 . # city of Iran
OPTIONAL {
?article_ckb schema:about ?city.
?article_ckb schema:inLanguage "ckb".
?article_ckb schema:isPartOf <https://ckb.wikipedia.org/>.
}
FILTER(!BOUND(?article_ckb)) # Exclude cities with articles in ckb Wikipedia
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Note: Do you see the exclamation mark (
)? If you remove it, you will only get all the articles created on Central Kurdish Wikipedia. In other words, you will get the opposite result here.
!
Top 1000 categories available on most wikis, but not on Central Kurdish Wikipedia
editCredit: User:TomT0m@wikidata is the original author of the first version of this query. See: https://w.wiki/8Uwv
This is really useful for small (and mid-sized) wikis to get started. See w:ckb:ویکیپیدیا:ڕاپۆرتی بنکەدراوە/پۆلە گرنگە دروست نەکراوەکان
SELECT ?item ?enLabel ?numOfSitelinks {
?item wdt:P31 wd:Q4167836 .
?item wikibase:sitelinks ?numOfSitelinks . hint:Prior hint:rangeSafe "true" .
?item rdfs:label ?enLabel.
filter(lang(?enLabel) = "en")
filter (?numOfSitelinks > 70)
MINUS {
?cat schema:isPartOf <https://ckb.wikipedia.org/> ;
schema:about ?item .
}
} ORDER BY DESC(?numOfSitelinks) LIMIT 1000
You can do the same for other topics such as below one.
Top 100 Biography articles available on most wikis, but not yet created on Central Kurdish Wikipedia
editReferenced from above query.
SELECT ?item ?enwiki ?numOfSitelinks ?genderLabel (GROUP_CONCAT(DISTINCT ?citizenshipLabel; separator="؛ ") AS ?citizenships)
WHERE {
{
SELECT DISTINCT ?item ?enwiki ?numOfSitelinks ?genderLabel ?citizenshipLabel
WHERE {
?item wdt:P31 wd:Q5 .
?item wikibase:sitelinks ?numOfSitelinks .
hint:Prior hint:rangeSafe "true" .
FILTER (?numOfSitelinks > 70)
OPTIONAL {
?item wdt:P21 ?gender .
?gender rdfs:label ?genderLabel .
FILTER(LANG(?genderLabel) = "ckb")
}
OPTIONAL {
?item wdt:P27 ?citizenship .
?citizenship rdfs:label ?citizenshipLabel .
FILTER(LANG(?citizenshipLabel) = "ckb")
}
OPTIONAL {
?enwikiPage schema:about ?item ;
schema:isPartOf <https://en.wikipedia.org/> ;
schema:name ?enTitle .
BIND(CONCAT("[[:en:", ?enTitle, "|", ?enTitle, "]]") AS ?enwiki)
}
MINUS {
?cat schema:isPartOf <https://ckb.wikipedia.org/> ;
schema:about ?item .
}
}
}
}
GROUP BY ?item ?enwiki ?numOfSitelinks ?genderLabel
ORDER BY DESC(?numOfSitelinks)
LIMIT 100