query-ad6e1ea59eaca0490ecd60955cf3a0bf

rq turtle/ttl

(Direct) Triple Count of Indonesian National Heroes SELECT ?itemID ?itemIDLabel (COUNT(?directProp) AS ?tripleCount) WHERE { ?itemID wdt:P166 wd:Q1369309 . # Indonesian national hero { # focus on direct properties ?itemID ?directProp ?directPropValue . _:bnode wikibase:directClaim ?directProp . ?itemID rdfs:label ?itemIDLabel FILTER(LANG(?itemIDLabel)="en") } } GROUP BY ?itemID ?itemIDLabel ORDER BY DESC(?tripleCount)

Use at

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#>
# (Direct) Triple Count of Indonesian National Heroes
SELECT ?itemID ?itemIDLabel (COUNT(?directProp) AS ?tripleCount)
WHERE {
    ?itemID wdt:P166 wd:Q1369309 .  # Indonesian national hero
    {                               # focus on direct properties
      ?itemID ?directProp ?directPropValue .
      _:bnode wikibase:directClaim ?directProp .
      ?itemID rdfs:label ?itemIDLabel
      FILTER(LANG(?itemIDLabel)="en")
    }
}
GROUP BY ?itemID ?itemIDLabel ORDER BY DESC(?tripleCount)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?directProp"):::projected v5("?directPropValue") v2("?itemID"):::projected v3("?itemIDLabel"):::projected v6("?tripleCount") a1((" ")) c2(["wd:Q1369309"]):::iri v2 --"wdt:P166"--> c2 f0[["?itemIDLabel = 'en'"]] f0 --> v3 v2 -->v4--> v5 a1 --"wikibase:directClaim"--> v4 v2 --"rdfs:label"--> v3 bind2[/"count(?directProp)"/] v4 --o bind2 bind2 --as--o v6