query-6c6fd4be53971074fc85ecec5ab4a7ee

rq turtle/ttl

TODO

Use at

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#>
#Organizations of the Balearic Islands by type
#defaultView:BubbleChart
SELECT ?name ?nameLabel (COUNT(DISTINCT ?org) as ?count) WHERE {
  ?org wdt:P31 ?name;
       wdt:P131+ wd:Q5765 .
  ?name wdt:P279* wd:Q43229 .
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
}
GROUP BY ?name ?nameLabel
ORDER BY DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?count") v3("?name"):::projected v2("?org"):::projected c7(["bd:serviceParam"]):::iri c9(["en"]):::literal c5(["wd:Q43229"]):::iri c3(["wd:Q5765"]):::iri v2 --"wdt:P31"--> v3 v2 --"wdt:P131"--> c3 v3 --"wdt:P279"--> c5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind1[/"count(?org)"/] v2 --o bind1 bind1 --as--o v4