query-3e7ad3227ccb9d6120930c3c9111ab18

rq turtle/ttl

Gender usage on wikidata

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT  ?gender ?genderLabel (count(*) as ?count)
WHERE
{
    ?item wdt:P31 wd:Q5 .
    ?item wdt:P21 ?gender .
    FILTER ( ?gender != wd:Q6581072 )
    FILTER ( ?gender != wd:Q6581097 )
    FILTER (! isBLANK(?gender)) .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }  
}
GROUP BY ?gender ?genderLabel
ORDER BY DESC(?count) ASC(?gender)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?count") v2("?gender"):::projected v3("?item") c7(["bd:serviceParam"]):::iri c4(["wd:Q5"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["not isBlank(?gender)"]] f0 --> v2 f1[["?gender != 'wd:Q6581097'"]] f1 --> v2 f2[["?gender != 'wd:Q6581072'"]] f2 --> v2 v3 --"wdt:P31"--> c4 v3 --"wdt:P21"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind4[/"count(*)"/] bind4 --as--o v4