query-c8a12f4401b4f4dfbdf8906ab10f4046

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#>
SELECT ?item ?itemLabel
WHERE
{
  {
    SELECT DISTINCT ?item
    WHERE
    {
      ?item wdt:P17 wd:Q241 . # ?item is Cuban
       # There are much fewer Cuban items than organizations, but the optimizer cannot see that.

      ?item wdt:P31 ?instance.
      ?instance wdt:P279* wd:Q43229 . # ?item is an organisation
       # Check if Cuban items are organizations rather than 
                                         # finding all organizations and check if they are Cuban
    }
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],es,en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?instance") v1("?item"):::projected c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,es,en"]):::literal c5(["wd:Q43229"]):::iri c2(["wd:Q241"]):::iri v1 --"wdt:P17"--> c2 v1 --"wdt:P31"--> v2 v2 --"wdt:P279"--> c5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end