query-0d46997b1f437e9ee997383957ec9c18

rq turtle/ttl

Featured articles of all Wikimedia projects

Get all Featured Articles (Q17437796)

SELECT distinct ?item ?itemLabel (count(distinct ?sitelink) as ?fa_count) WHERE { ?sitelink schema:name ?name; schema:inLanguage ?lang; schema:about ?item. # Sitelink is badged as a Featured Article ?sitelink wikibase:badge wd:Q17437796. hint:Prior hint:runFirst true. ?sitelink schema:isPartOf ?partOf. ?partOf wikibase:wikiGroup "wikipedia" . SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } group by ?item ?itemLabel order by desc(?fa_count)

Use at

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#>
#Featured articles of all Wikimedia projects
# Get all Featured Articles (Q17437796)
SELECT distinct ?item ?itemLabel (count(distinct ?sitelink) as ?fa_count) WHERE {
  ?sitelink schema:name ?name;
    schema:inLanguage ?lang;
    schema:about ?item.
    # Sitelink is badged as a Featured Article
    ?sitelink wikibase:badge wd:Q17437796. 
    ?sitelink schema:isPartOf ?partOf.
    ?partOf wikibase:wikiGroup "wikipedia" . 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} group by ?item ?itemLabel order by desc(?fa_count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?fa_count") v5("?item"):::projected v4("?lang") v3("?name") v6("?partOf") v2("?sitelink"):::projected c10(["bd:serviceParam"]):::iri c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal c8(["wikipedia"]):::literal c5(["wd:Q17437796"]):::iri v2 --"schema:name"--> v3 v2 --"schema:inLanguage"--> v4 v2 --"schema:about"--> v5 v2 --"wikibase:badge"--> c5 v2 --"schema:isPartOf"--> v6 v6 --"wikibase:wikiGroup"--> c8 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end bind1[/"count(?sitelink)"/] v2 --o bind1 bind1 --as--o v7