query-1d48b0a74a7c599ea51e0d6b7147835f

rq turtle/ttl

TODO

Use at

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#>
SELECT ?item ?ilen ?ilar {
  ?item wdt:P31/wdt:P279* wd:Q486972. # are some type of human settlement
  ?item wdt:P17 ?country. ?country wdt:P37 wd:Q13955. # in countries with official language Arabic
  OPTIONAL { ?item rdfs:label ?ilen. FILTER(LANG(?ilen)="en") } # get the English label only
  OPTIONAL { ?item rdfs:label ?ilar. FILTER(LANG(?ilar)="ar") } # get the Arabic label only
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?country") v1("?ilar"):::projected v2("?ilen"):::projected v3("?item"):::projected a1((" ")) c5(["wd:Q486972"]):::iri c8(["wd:Q13955"]):::iri v3 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c5 v3 --"wdt:P17"--> v4 v4 --"wdt:P37"--> c8 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."rdfs:label".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."rdfs:label".-> v1 end