query-dd8514958cc5fae5f3361d27f3bd4f49

rq turtle/ttl

Most occupations for genderless japanese people

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 ?occupation ?occupationLabel (COUNT(?occupation) as ?cnt) {
  BIND(wd:Q17 AS ?country)
  ?person wdt:P31 wd:Q5 ;
          wdt:P27 ?country . 
  ?person wdt:P106 ?occupation .
  OPTIONAL {?person wdt:P21 ?gender} FILTER (!bound(?gender))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de,fr,es,ru,ca,it,ja,ko,zh" } 
}
group by ?occupation ?occupationLabel
order by desc(?cnt)
limit 20

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?cnt") v3("?country") v2("?gender") v5("?occupation"):::projected v4("?person") c7(["bd:serviceParam"]):::iri c9(["en,de,fr,es,ru,ca,it,ja,ko,zh"]):::literal c2(["wd:Q5"]):::iri f0[["not bound(?gender)"]] f0 --> v2 bind1[/"'wd:Q17'"/] bind1 --as--o v3 v4 --"wdt:P31"--> c2 v4 --"wdt:P27"--> v3 v4 --"wdt:P106"--> v5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P21".-> v2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind3[/"count(?occupation)"/] v5 --o bind3 bind3 --as--o v6