query-8c39b27f6f0dd0fdc0ab0b9e660499f8

rq turtle/ttl

Most used qualifiers attached to a specific corpus of values, here specifically about terms of French deputies SELECT ?qualifier ?proprertyLabel (COUNT(?value) AS ?count) WHERE { # Characteristics of the corpus - CHANGE HERE FOR YOUR CORPUS ?deputy wdt:P39 wd:Q3044918 . ?deputy p:P39 ?value . ?value pq:P2937 wd:Q24939798 . # No need to change after this line ?value ?qualifier [] . OPTIONAL { ?proprerty wikibase:qualifier ?qualifier } . OPTIONAL { ?proprerty wikibase:qualifierValue ?qualifier } . OPTIONAL { ?proprerty wikibase:statementProperty ?qualifier } . SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } . } GROUP BY ?qualifier ?proprertyLabel ORDER BY DESC(?count)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Most used qualifiers attached to a specific corpus of values, here specifically about terms of French deputies
SELECT ?qualifier ?proprertyLabel (COUNT(?value) AS ?count)
WHERE {
  # Characteristics of the corpus - CHANGE HERE FOR YOUR CORPUS
  ?deputy wdt:P39 wd:Q3044918 .
  ?deputy p:P39 ?value .
  ?value pq:P2937 wd:Q24939798 .
  # No need to change after this line
  ?value ?qualifier [] .
  OPTIONAL { ?proprerty wikibase:qualifier ?qualifier } .
  OPTIONAL { ?proprerty wikibase:qualifierValue ?qualifier } .
  OPTIONAL { ?proprerty wikibase:statementProperty ?qualifier } .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } .
}
GROUP BY ?qualifier ?proprertyLabel
ORDER BY DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?count") v2("?deputy") v5("?proprerty") v4("?qualifier"):::projected v3("?value"):::projected a1((" ")) c10(["bd:serviceParam"]):::iri c2(["wd:Q3044918"]):::iri c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal c5(["wd:Q24939798"]):::iri v2 --"p:direct/P39"--> c2 v2 --"p:P39"--> v3 v3 --"p:qualifier/P2937"--> c5 v3 -->v4--> a1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."wikibase:qualifier".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."wikibase:qualifierValue".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v5 -."wikibase:statementProperty".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end bind1[/"count(?value)"/] v3 --o bind1 bind1 --as--o v6