query-3d0f6ac672a7e29516273db0a2790ec0

rq turtle/ttl

title:count of statements by property for instances SELECT ?property ?propertyLabel ?count WITH { SELECT ?property (count(distinct ?property) as ?count) WHERE { ?item wdt:P31 wd:Q3918. hint:Prior hint:runFirst true. ?item ?predicate []. ?property wikibase:directClaim ?predicate . } group by ?property ?propertyLabel } as %props WHERE { INCLUDE %props SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } 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 bd: <http://www.bigdata.com/rdf#>
#title:count of statements by property for instances
SELECT ?property ?propertyLabel ?count WHERE
{
   {
  SELECT ?property (count(distinct ?property) as ?count)
WHERE 
{
  ?item wdt:P31 wd:Q3918.

  ?item ?predicate [].
  ?property wikibase:directClaim ?predicate .
} group by ?property ?propertyLabel }  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?count"):::projected v2("?item") v3("?predicate") v4("?property"):::projected a1((" ")) c5(["bd:serviceParam"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q3918"]):::iri v2 --"wdt:P31"--> c2 v2 -->v3--> a1 v4 --"wikibase:directClaim"--> v3 bind1[/"count(?property)"/] v4 --o bind1 bind1 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end