query-3989d69438efb0dcf314f228943f94eb

rq turtle/ttl

Property explorationvalues used as qualifiers for a property:

Use at

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?qual ?qualLabel ?count WHERE {
  {
    SELECT ?qual (COUNT(DISTINCT ?item) AS ?count) WHERE {
         ?item p:P1684 ?statement .
         ?statement pq:P31 ?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; v6("?count"):::projected v3("?item") v5("?qual"):::projected v2("?qualLabel"):::projected v4("?statement") v3 --"p:P1684"--> v4 v4 --"p:qualifier/P31"--> v5 bind1[/"count(?item)"/] v3 --o bind1 bind1 --as--o v6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."rdfs:label".-> v2 end