query-26de1d5a150ea1e3f8a2be026573a418

rq turtle/ttl

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

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

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?gender") v3("?genderLabel"):::projected v4("?number") v1("?person"):::projected c5(["bd:serviceParam"]):::iri c2(["wd:Q5"]):::iri c7(["en"]):::literal bind0[/VALUES ?person/] bind0-->v1 bind00(["wd:Q5593"]) bind00 --> bind0 bind01(["wd:Q23548"]) bind01 --> bind0 bind02(["wd:Q5577"]) bind02 --> bind0 v1 --"wdt:P31"--> c2 v1 --"wdt:P21"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 v2 --"rdfs:label"--> v3 end bind2[/"count(?person)"/] v1 --o bind2 bind2 --as--o v4