query-38caaa1e816f17e6284195c9524242f5

rq turtle/ttl

NARA P1225 SELECT ?natureLabel (COUNT(?item) as ?total) WHERE { ?item wdt:P1225 ?ID; wdt:P31 ?nature. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } GROUP BY ?natureLabel ORDER BY DESC(?total)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#NARA P1225
SELECT ?natureLabel (COUNT(?item) as ?total)
WHERE 
{
  ?item wdt:P1225 ?ID;
        wdt:P31 ?nature.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?natureLabel
ORDER BY DESC(?total)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?ID") v2("?item"):::projected v4("?nature") v5("?total") c4(["bd:serviceParam"]):::iri c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P1225"--> v3 v2 --"wdt:P31"--> v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end bind1[/"count(?item)"/] v2 --o bind1 bind1 --as--o v5