query-045681c5e235d97d990272f295f2917a

rq turtle/ttl

Literary awards by gender

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#>
#defaultView:ScatterChart
# Statistics on number of recipients for award wrt. gender
SELECT ?men ?women ?award ?awardLabel WHERE {
{  SELECT (COUNT(?recipient_male) AS ?men) (COUNT(?recipient_female) AS ?women) ?award WHERE {
    ?award wdt:P31 wd:Q378427 # literary award
    { 
      ?recipient_male wdt:P166 ?award .
      ?recipient_male wdt:P21 wd:Q6581097 .
    }
    UNION 
    {
      ?recipient_female wdt:P166 ?award .
      ?recipient_female wdt:P21 wd:Q6581072 .
    }  
  }
  GROUP BY ?award
           }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?award"):::projected v4("?men"):::projected v3("?recipient_female") v2("?recipient_male") v5("?women"):::projected c8(["bd:serviceParam"]):::iri c5(["wd:Q6581097"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q378427"]):::iri c6(["wd:Q6581072"]):::iri v1 --"wdt:P31"--> c2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P166"--> v1 v3 --"wdt:P21"--> c6 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P166"--> v1 v2 --"wdt:P21"--> c5 end union0r <== or ==> union0l end bind2[/"count(?recipient_male)"/] v2 --o bind2 bind2 --as--o v4 bind3[/"count(?recipient_female)"/] v3 --o bind3 bind3 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end