query-cdf506af282dcc61132ef8e9a514b592
Find the today's featured article or a range (from the start to today for example)Hi, I'm creating a script to extract the number of different gender outlinks and make a statistic, but I need a way to get the Q of today's (or a given day or period of time) featured article. If possible, in all wikipedias. But the latter could be solvable with pywikibot, which I'm using. My query is this.
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
"""SELECT ?gender ?genderLabel (count(distinct ?person) as ?number)
WHERE
{
?person ?transcluded wd:qualifier.
?person wdt:P31 wd:Q5.
?person wdt:P21 ?gender.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?gender rdfs:label ?genderLabel.}
}
GROUP BY ?gender ?genderLabel """