query-26de1d5a150ea1e3f8a2be026573a418
So I'm looking for a way to replace "qualifier" with the qualifier of a featured article. I thought of filtering with templates, but each wikipedia uses a different template, so it's not suited for my project. 15:18, 7 April 2021 (UTC)) talk (DestokadoThank you in advance,--11:42, 8 April 2021 (UTC)) talk (TagishsimonI don't think this is possible from WDQS. It has no clue about whether & when featured articles were 'Today's FA', nor can I see a way of using MWAPI to get that information. -- PS: Sorry if tagging is not appropiate, I'm quite new to WM20:48, 13 April 2021 (UTC)) talk (Destokado I've changed my approach, instead of the featured article, I tried with the whole main page. The thing is, when I try to get the transcluded articles of the Q5296, It always yields 0 rows. Moreover, is there a way to indicate which language edition I want to query? Thank you --Tagishsimon@ schema:name ?sitelink . > ; https://en.wikipedia.org/ schema:isPartOf < ?article schema:about ?item ;The SPARQL incantations for sitelinks of an ?item are along the lines of helps at all. In essence that item provides the main page URL for wikipedias, but does not provide a means by which any understanding of their content can be gleaned. There is no transcluded article, but just a URL which says 'there's a main page here'.(Q5296)Wikimedia main page : I don't think Destokado@ 23:36, 13 April 2021 (UTC)) talk (Tagishsimon predicate. -- schema:isPartOf "so it's possible to identify the language wikipedia using the : I've taken your advice and I changed my approach again. I'm going to explain it just in case it may be helpful for other devs. TagishsimonThank you, @Then, I put those Q in the VALUES of the next query and compute the genders occurrences like this: Then, (the most expensive operation) using pywikibot, I get the Q of each page returned by pagelinks. I query the lang wiki for the pagelinks of a given pageID (the page_id of the Main Page of the language, previously stored on a file).
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 ?genderLabel (COUNT(DISTINCT ?person) AS ?number) WHERE {
VALUES ?person {
wd:Q5593
wd:Q23548
wd:Q5577
}
?person wdt:P31 wd:Q5;
wdt:P21 ?gender.
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en".
?gender rdfs:label ?genderLabel.
}
}
GROUP BY ?gender ?genderLabel