query-e057393d3825c9ba5ca3fe425829cbd7
note: comparing the results of this (having SELECT DISTINCT) with the previous one (having simply SELECT), you will most probably notice a decrease of results; this is due to items having 2+ death dates with normal rank (which should be fixed, promoting the best date to preferred rank); DISTINCT deduplicates the results
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#>
#defaultView:Map
#title:Persons born in Liepāja with a death place with coordinates and with LNB ID
SELECT ?item ?itemLabel ?deathplace ?deathplaceLabel ?coordinates ?lnb
wHERE {
?item wdt:P31 wd:Q5 .
?item wdt:P19 wd:Q167668 .
?item wdt:P20 ?deathplace .
?deathplace wdt:P625 ?coordinates .
?item wdt:P1368 ?lnb .
SERVICE wikibase:label { bd:serviceParam wikibase:language "lv,mul,en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?coordinates"):::projected
v2("?deathplace"):::projected
v1("?item"):::projected
v4("?lnb"):::projected
c4(["wd:Q167668"]):::iri
c9(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
c11(["lv,mul,en"]):::literal
v1 --"wdt:P31"--> c2
v1 --"wdt:P19"--> c4
v1 --"wdt:P20"--> v2
v2 --"wdt:P625"--> v3
v1 --"wdt:P1368"--> v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end