query-df738cf7b479e02587d3781f5ea0bea6

rq turtle/ttl

14:53, 7 October 2018 (UTC) JuraAbove a slightly different query. There might have been too many results to sort and there was no link between ?occup and ?female. You could also limit ?person directly to females. --- If you only want people who have an Arabic Wikipedia page, then maybe this does what you want:

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select ?occup ?occuplabel ?total
where {
   {
  select ?occup (count(*) as ?total) {
    ?sitelink schema:isPartOf <https://ar.wikipedia.org/> ; schema:about ?item .

    ?item wdt:P31 wd:Q5 ;
          wdt:P21 wd:Q6581072 ;
          wdt:P106 ?occup .
  } group by ?occup
}.
  optional { ?occup rdfs:label ?occuplabel filter (lang(?occuplabel) = "en") }
} order by desc(?total) ?occuplabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?item") v5("?occup"):::projected v2("?occuplabel"):::projected v3("?sitelink") v6("?total"):::projected c6(["wd:Q5"]):::iri c3([https://ar.wikipedia.org/]):::iri c8(["wd:Q6581072"]):::iri v3 --"schema:isPartOf"--> c3 v3 --"schema:about"--> v4 v4 --"wdt:P31"--> c6 v4 --"wdt:P21"--> c8 v4 --"wdt:P106"--> v5 bind1[/"count(*)"/] bind1 --as--o v6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."rdfs:label".-> v2 end