query-4ad83096b60b7b35aad6f658ab135a00
in each property. (P2302)property constraint The following query gets the count of different values for
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
?property
?propertyLabel
?count
{
{
SELECT
?property
(COUNT(*) AS ?count)
{
{
SELECT DISTINCT ?property ?value {
?property
a wikibase:Property;
p:P2302 [ps:P2302 ?value].
}
}
}
GROUP BY ?property
}
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;
v4("?count"):::projected
v2("?property"):::projected
v3("?value")
a1((" "))
c6(["bd:serviceParam"]):::iri
c2(["wikibase:Property"]):::iri
c8(["#91;AUTO_LANGUAGE#93;"]):::literal
v2 --"a"--> c2
a1 --"p:statement/P2302"--> v3
v2 --"p:P2302"--> a1
bind1[/"count(*)"/]
bind1 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end