query-e40af2f6c033566ce1a651e0e8084b87
Listing labels for Moldovan settlements
SELECT ?item ?itemLabelRO ?itemLabelEN WHERE {
VALUES ?type {wd:Q3957 wd:Q515 wd:Q532 wd:Q486972} #Q486972 - human settlement; Q515 - city; Q532 - village; Q15068450 - district of Moldova; Q4229812 - commune of Moldova; Q1963041 - municipality of Moldova; Q2989457 - urban-type settlement
?item wdt:P31 ?type .
?item wdt:P17 wd:Q217 .
?item rdfs:label ?itemLabelRO filter (lang(?itemLabelRO) = "ro") .
OPTIONAL {
?item rdfs:label ?itemLabelEN filter (lang(?itemLabelEN) = "en") .
}
}
LIMIT 50
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#>
# Listing labels for Moldovan settlements
SELECT ?item ?itemLabelRO ?itemLabelEN WHERE {
VALUES ?type {wd:Q3957 wd:Q515 wd:Q532 wd:Q486972} #Q486972 - human settlement; Q515 - city; Q532 - village; Q15068450 - district of Moldova; Q4229812 - commune of Moldova; Q1963041 - municipality of Moldova; Q2989457 - urban-type settlement
?item wdt:P31 ?type .
?item wdt:P17 wd:Q217 .
?item rdfs:label ?itemLabelRO filter (lang(?itemLabelRO) = "ro") .
OPTIONAL {
?item rdfs:label ?itemLabelEN filter (lang(?itemLabelEN) = "en") .
}
}
LIMIT 50
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?item"):::projected
v2("?itemLabelEN"):::projected
v1("?itemLabelRO"):::projected
v3("?type")
c5(["wd:Q217"]):::iri
f0[["?itemLabelRO = 'ro'"]]
f0 --> v1
bind1[/VALUES ?type/]
bind1-->v3
bind10(["wd:Q3957"])
bind10 --> bind1
bind11(["wd:Q515"])
bind11 --> bind1
bind12(["wd:Q532"])
bind12 --> bind1
bind13(["wd:Q486972"])
bind13 --> bind1
v4 --"wdt:P31"--> v3
v4 --"wdt:P17"--> c5
v4 --"rdfs:label"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."rdfs:label".-> v2
end