query-acbc28c27ef7527fc8a5f8e07d28e69b
IslandsA lift of islands whose name (in English) begins with a letter A-H. 13:04, 11 September 2024 (UTC) )talk · MSGJ(Thank you! — Martin Something like this...
Use at
- https://query.wikidata.org/sparql
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 ?itemLabel WHERE {
?item wdt:P31 wd:Q23442 . # may want subclass as well
?item rdfs:label ?itemLabel .
FILTER (LANG(?itemLabel) = "en" )
FILTER REGEX(?itemLabel, "^[A-H]" ) # regular expression: the start of the string is in the range A...H
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v1("?itemLabel"):::projected
c4(["wd:Q23442"]):::iri
f0[["regex(?itemLabel,'^#91;A-H#93;')"]]
f0 --> v1
f1[["?itemLabel = 'en'"]]
f1 --> v1
v2 --"wdt:P31"--> c4
v2 --"rdfs:label"--> v1