query-c91217e1d6851d970650880bb486a84d
Towns of Lithuania with less than 1000 people that have a railway station
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Towns of Lithuania with less than 1000 people that have a railway station
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?place ?placeLabel ?population ?countryLabel ?coords ?image WHERE {
?item (wdt:P31/(wdt:P279*)) wd:Q55488;
wdt:P131 ?place.
?place wdt:P1082 ?population;
wdt:P17 ?country.
?item wdt:P17 wd:Q37.
OPTIONAL { ?item wdt:P625 ?coords. }
OPTIONAL { ?item wdt:P18 ?image. }
FILTER(?population < 1000 )
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY (?population)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?coords"):::projected
v4("?country")
v6("?image"):::projected
v2("?item"):::projected
v3("?place"):::projected
v1("?population"):::projected
a1((" "))
c8(["wd:Q37"]):::iri
c12(["bd:serviceParam"]):::iri
c4(["wd:Q55488"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?population < '1000^^xsd:integer'"]]
f0 --> v1
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c4
v2 --"wdt:P131"--> v3
v3 --"wdt:P1082"--> v1
v3 --"wdt:P17"--> v4
v2 --"wdt:P17"--> c8
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P625".-> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P18".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end