query-6503b07ea821bca1795a811c414805d5
Propertiesinstance of (P31)sex or gender (P21)
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT (count(?gender) as ?count) ?genderLabel
WHERE {
?item wdt:P31 wd:Q5. # all humans
?item wdt:P21 ?gender. # who have some gender property
?article schema:about ?item. # and have an article about them
?article schema:isPartOf <https://ml.wikipedia.org/> . # on *Malayalam* Wikipedia
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?genderLabel
ORDER BY DESC(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?article")
v5("?count")
v3("?gender"):::projected
v2("?item")
c8(["bd:serviceParam"]):::iri
c6([https://ml.wikipedia.org/]):::iri
c2(["wd:Q5"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"wdt:P31"--> c2
v2 --"wdt:P21"--> v3
v4 --"schema:about"--> v2
v4 --"schema:isPartOf"--> c6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind1[/"count(?gender)"/]
v3 --o bind1
bind1 --as--o v5