query-f16a5227ca0a4b576a4cb4f402f5bd22

rq turtle/ttl

PropertiesFAST ID (P2163)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?qual ?qualLabel ?count WHERE {
  {
    SELECT ?qual (COUNT(DISTINCT ?item) AS ?count) WHERE {

         ?item p:P2163 ?statement .
         ?statement ?pq_qual ?pq_obj .
         ?qual wikibase:qualifier ?pq_qual .
    }  GROUP BY ?qual
  } .

  OPTIONAL {
    ?qual rdfs:label ?qualLabel filter (lang(?qualLabel) = "en") .
  }
}
ORDER BY DESC(?count) ASC(?qualLabel)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?count"):::projected v3("?item") v6("?pq_obj") v5("?pq_qual") v7("?qual"):::projected v2("?qualLabel"):::projected v4("?statement") v3 --"p:P2163"--> v4 v4 -->v5--> v6 v7 --"wikibase:qualifier"--> v5 bind1[/"count(?item)"/] v3 --o bind1 bind1 --as--o v8 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v7 -."rdfs:label".-> v2 end