query-72fb50c0102090857dc82c1ce831ba42
All different properties used by a big city in India SELECT ?property (COUNT(?object) AS ?count) ?propertyLabel WHERE { ?object ?wdt ?value. ?property wikibase:directClaim ?wdt. ?object wdt:P17 wd:Q668. ?object wdt:P31 wd:Q1549591. SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } GROUP BY ?property ?propertyLabel 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#>
#All different properties used by a big city in India
SELECT ?property (COUNT(?object) AS ?count) ?propertyLabel
WHERE {
?object ?wdt ?value.
?property wikibase:directClaim ?wdt.
?object wdt:P17 wd:Q668.
?object wdt:P31 wd:Q1549591.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
GROUP BY ?property ?propertyLabel
ORDER BY DESC(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?count")
v2("?object"):::projected
v5("?property"):::projected
v4("?value")
v3("?wdt")
c7(["bd:serviceParam"]):::iri
c3(["wd:Q668"]):::iri
c5(["wd:Q1549591"]):::iri
c9(["en"]):::literal
v2 -->v3--> v4
v5 --"wikibase:directClaim"--> v3
v2 --"wdt:P17"--> c3
v2 --"wdt:P31"--> c5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind1[/"count(?object)"/]
v2 --o bind1
bind1 --as--o v6