query-158a6ae75435e495575a61f3da79a199

rq turtle/ttl

Frequency table of uses of properties in direct claims, qualifiers and references

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
  ?property
  ?propertyLabel
  ?countInDirectClaims
  ?countInQualifiers
  ?countInReferences
{
   {
  SELECT ?property (?count AS ?countInDirectClaims) {
     {
  SELECT ?wdt (COUNT(*) AS ?count) {
    [] ?wdt [].
  }
  GROUP BY ?wdt
}
    ?property wikibase:directClaim ?wdt.
  }
}
   {
  SELECT ?property (?count AS ?countInQualifiers) {
     {
  SELECT ?wdt (COUNT(*) AS ?count) {
    [] ?wdt [].
  }
  GROUP BY ?wdt
}
    ?property wikibase:qualifier ?wdt.
  }
}
   {
  SELECT ?property (?count AS ?countInReferences) {
     {
  SELECT ?wdt (COUNT(*) AS ?count) {
    [] ?wdt [].
  }
  GROUP BY ?wdt
}
    ?property wikibase:reference ?wdt.
  }
}
  SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE]"}.
}
ORDER BY DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?count") v4("?countInDirectClaims"):::projected v5("?countInQualifiers"):::projected v6("?countInReferences"):::projected v3("?property"):::projected v2("?wdt") a1((" ")) a2((" ")) a3((" ")) a4((" ")) a5((" ")) a6((" ")) c5(["bd:serviceParam"]):::iri c7(["#91;AUTO_LANGUAGE#93;"]):::literal a1 -->v2--> a2 bind1[/"count(*)"/] bind1 --as--o v6 v3 --"wikibase:directClaim"--> v2 bind2[/"?count"/] v6 --o bind2 bind2 --as--o v4 a3 -->v2--> a4 bind4[/"count(*)"/] bind4 --as--o v6 v3 --"wikibase:qualifier"--> v2 bind5[/"?count"/] v6 --o bind5 bind5 --as--o v5 a5 -->v2--> a6 bind7[/"count(*)"/] bind7 --as--o v6 v3 --"wikibase:reference"--> v2 bind8[/"?count"/] v6 --o bind8 bind8 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end