query-34f012307e6d4066256279bb4f386ac6
title:count of statements by property for instances SELECT ?property ?propertyLabel ?count WITH { SELECT ?property (count(?property) as ?count) WHERE { ?item wdt:P31/wdt:P279* wd:Q121117. ?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
- https://query.wikidata.org/sparql
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(?property) as ?count)
WHERE
{
?item wdt:P31/wdt:P279* wd:Q121117.
?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
a2((" "))
a1((" "))
c6(["bd:serviceParam"]):::iri
c3(["wd:Q121117"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v2 -->v3--> a2
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;
c6 --"wikibase:language"--> c8
end