query-eefcc2fa1d49a8bb7e1af6b21a3aa9e7

rq turtle/ttl

query

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?value ?valueLabel ?ar ?ct
WHERE
{
  {
    SELECT ?value (count(*) as ?ct)
    WHERE
    { ?item wdt:P105 ?value }
    GROUP BY ?value
    ORDER BY DESC(?ct)
    LIMIT 1000
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
    OPTIONAL {
    ?value rdfs:label ?ar filter (lang(?ar) = "ar") .
  }
}
ORDER BY DESC(?ct) ASC(?value)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?ar"):::projected v5("?ct"):::projected v4("?item") v2("?value"):::projected c4(["bd:serviceParam"]):::iri c6(["en"]):::literal v4 --"wdt:P105"--> v2 bind1[/"count(*)"/] bind1 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."rdfs:label".-> v3 end