query-2071ca7d734cbb8ff80b77d85c590918

rq turtle/ttl

Humans by occupation

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(DISTINCT(?human)) AS ?number) WHERE {
  ?human wdt:P31 wd:Q5 .
  ?human wdt:P106 ?occupation
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
}
GROUP BY ?occupation ?occupationLabel
HAVING (?number >= 100)
ORDER BY DESC(?number)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?human"):::projected v4("?number") v3("?occupation"):::projected c6(["bd:serviceParam"]):::iri c3(["wd:Q5"]):::iri c8(["en"]):::literal f0[["?number >= '100^^xsd:integer'"]] f0 --> v4 v2 --"wdt:P31"--> c3 v2 --"wdt:P106"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end bind2[/"count(?human)"/] v2 --o bind2 bind2 --as--o v4