query-4ad539d83298087c6daff1c4056bd654
count of properties for all instances of an item
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#>
SELECT DISTINCT ?property ?propertyLabel ?count
WHERE {
{
SELECT DISTINCT ?property (COUNT(*) AS ?count) WHERE {
{
SELECT DISTINCT ?item WHERE {
?item wdt:P31*/wdt:P279* wd:Q20820271 .
}
LIMIT 200000
}
?item ?p [ ] .
?property a wikibase:Property;
wikibase:claim ?p.
}
GROUP BY ?property
LIMIT 100
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY DESC(?count)
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count"):::projected
v2("?item")
v3("?p")
v4("?property"):::projected
a2((" "))
a1((" "))
c8(["bd:serviceParam"]):::iri
c3(["wd:Q20820271"]):::iri
c5(["wikibase:Property"]):::iri
c10(["en"]):::literal
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v2 -->v3--> a2
v4 --"a"--> c5
v4 --"wikibase:claim"--> v3
bind1[/"count(*)"/]
bind1 --as--o v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end