query-5a1a0db70d90bc2da24731fe524b5a3d
Get all articles from the Wikipedia: namespace of all language editions with 10 or more sitelinks
adapted from "Get all Featured Articles (Q17437796)" (https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples#Featured_articles_of_all_Wikimedia_projects)
SELECT ?lang ?name ?itemLabel ?sitelink ?linkcount ?item WHERE { ?item wikibase:sitelinks ?linkcount . ?sitelink schema:name ?name ; schema:inLanguage ?lang ; schema:about ?item . #;wikibase:badge wd:Q17437796. # Comment this in (from original example) and the query works FILTER (?linkcount >= 394) . # For smaller queries, I've been testing with 394 (max is 395) instead of 10 FILTER (CONTAINS(?name, 'Wikipedia:')) . SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Must this change outside of main namespace? } ORDER BY DESC(?linkcount) LIMIT 100 #for testing
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/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Get all articles from the Wikipedia: namespace of all language editions with 10 or more sitelinks
# adapted from "Get all Featured Articles (Q17437796)" (https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples#Featured_articles_of_all_Wikimedia_projects)
SELECT ?lang ?name ?itemLabel ?sitelink ?linkcount ?item WHERE {
?item wikibase:sitelinks ?linkcount
.
?sitelink schema:name ?name
; schema:inLanguage ?lang
; schema:about ?item
.
#;wikibase:badge wd:Q17437796. # Comment this in (from original example) and the query works
FILTER (?linkcount >= 394) . # For smaller queries, I've been testing with 394 (max is 395) instead of 10
FILTER (CONTAINS(?name, 'Wikipedia:')) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Must this change outside of main namespace?
}
ORDER BY DESC(?linkcount)
LIMIT 100 #for testing