The following query get the number of items by gender in a Wikipedia article.
SELECT ?gender ?genderLabel (COUNT(?item) AS ?count)
WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "fr‧wikipedia.org";
wikibase:api "Generator";
mwapi:generator "links";
mwapi:titles "Sociologie";.
?item wikibase:apiOutputItem mwapi:item.
}
FILTER BOUND (?item) # Safeguard to not get a timeout from unbound items when using ?item below
?item wdt:P21 ?gender .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?gender ?genderLabel
I've been using thus query regularly this last two weeks and there was no bug but since yesterday night (March, 2nd 2021), this doesn't work anymore. Do you have any explanation for this behaviour change? PAC2 (talk) 20:18, 3 March 2021 (UTC)