query-6e867e570c4aac14c6e43ce8ef50aac8

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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?countryLabel where
{
   { 
  select ?item ?itemLabel ?nationLabel WHERE 
    {
      VALUES ?item {
                      wd:Q1479520
                      wd:Q28531806
                      wd:Q54823850
                      wd:Q60063834
                      wd:Q56191866
                      wd:Q2602068
                      wd:Q204389
                    }
      optional { ?item wdt:P27 ?nation. }
      SERVICE wikibase:label { bd:serviceParam wikibase:language "de,[AUTO_LANGUAGE]". 
                               ?item rdfs:label ?itemLabel .
                               ?nation rdfs:label ?nationLabel .
                             }
  } }  bind(coalesce(?nationLabel,"-empty-") as ?countryLabel)
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?countryLabel"):::projected v1("?item"):::projected v3("?itemLabel"):::projected v2("?nation") v4("?nationLabel") c3(["bd:serviceParam"]):::iri c5(["de,#91;AUTO_LANGUAGE#93;"]):::literal bind0[/VALUES ?item/] bind0-->v1 bind00(["wd:Q1479520"]) bind00 --> bind0 bind01(["wd:Q28531806"]) bind01 --> bind0 bind02(["wd:Q54823850"]) bind02 --> bind0 bind03(["wd:Q60063834"]) bind03 --> bind0 bind04(["wd:Q56191866"]) bind04 --> bind0 bind05(["wd:Q2602068"]) bind05 --> bind0 bind06(["wd:Q204389"]) bind06 --> bind0 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P27".-> v2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c3 --"wikibase:language"--> c5 v1 --"rdfs:label"--> v3 v2 --"rdfs:label"--> v4 end bind1[/"?nationLabel'-empty-'"/] v4 --o bind1 bind1 --as--o v5