query-6bfda3fff4a84f9979335f3716a8b2dc
Gender comparison
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 ?genderLabel (COUNT(?person) as ?person) WHERE {
#?person wdt:P4431 [] . # subject of a Google Doodle
#?person wdt:P1938 []. # things with a Project Gutenberg ID
?person wdt:P1417 []. # things in the Encyclopedia Britannica
#?article schema:about ?personĀ ; schema:isPartOf <https://ga.wikipedia.org/> . # Things in Irish language Wikipedia
#?person wdt:P106/wdt:P279? wd:Q864503 . # occupation: biologist
?person wdt:P31 wd:Q5. # only get people
?person wdt:P21 ?gender. # their gender
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Get labels in English
} GROUP BY ?genderLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?gender")
v3("?person"):::projected
a1((" "))
c6(["bd:serviceParam"]):::iri
c3(["wd:Q5"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v3 --"wdt:P1417"--> a1
v3 --"wdt:P31"--> c3
v3 --"wdt:P21"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind1[/"count(?person)"/]
v3 --o bind1
bind1 --as--o v3