query-4d7d913512dd247242ff1601521ef678

rq turtle/ttl

08:33, 21 July 2017 (UTC)) talk (31.168.180.89— Preceding unsigned comment added by why is that and how to fix it? thanks If you wrap the part with skos in "OPTIONAL" you will get a hit.

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?s ?sLabel ?sAltLabel WHERE {
  ?s wdt:P19 wd:Q844930.
 OPTIONAL { ?s skos:altLabel ?sAltLabel. }
 FILTER(CONTAINS(?sAltLabel, "Bolatu"@en)) 


  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
} limit 100

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?s"):::projected v1("?sAltLabel"):::projected c6(["bd:serviceParam"]):::iri c8(["en"]):::literal c3(["wd:Q844930"]):::iri f0[["contains(?sAltLabel,sBolatu^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString>')"]] f0 --> v1 v2 --"wdt:P19"--> c3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."skos:altLabel".-> v1 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end