query-7389d77baeefcbb293b345a77a54640c
Properties of national heroes of Indonesia ordered by property frequency SELECT ?directProp ?pLabel (COUNT(?directProp) AS ?propFreq) WHERE { ?itemID wdt:P166 wd:Q1369309 . # items with award received National Hero of Indonesia { # focus on direct properties ?itemID ?directProp _:bnode . ?prop wikibase:directClaim ?directProp . ?prop rdfs:label ?pLabel FILTER(LANG(?pLabel)="en") } } GROUP BY ?directProp ?pLabel ORDER BY DESC(?propFreq)
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
# Properties of national heroes of Indonesia ordered by property frequency
SELECT ?directProp ?pLabel (COUNT(?directProp) AS ?propFreq)
WHERE {
?itemID wdt:P166 wd:Q1369309 . # items with award received National Hero of Indonesia
{ # focus on direct properties
?itemID ?directProp _:bnode .
?prop wikibase:directClaim ?directProp .
?prop rdfs:label ?pLabel
FILTER(LANG(?pLabel)="en")
}
} GROUP BY ?directProp ?pLabel ORDER BY DESC(?propFreq)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?directProp"):::projected
v2("?itemID")
v3("?pLabel"):::projected
v5("?prop")
v6("?propFreq")
a1((" "))
c2(["wd:Q1369309"]):::iri
v2 --"wdt:P166"--> c2
f0[["?pLabel = 'en'"]]
f0 --> v3
v2 -->v4--> a1
v5 --"wikibase:directClaim"--> v4
v5 --"rdfs:label"--> v3
bind2[/"count(?directProp)"/]
v4 --o bind2
bind2 --as--o v6