query-a19b63dfa838026d679be41a0ada3420
title:Persons born in Riga with LNB ID and with a birthdate (all values except deprecated ones) SELECT ?item ?itemLabel ?lnb ?birthdate ?rank wHERE { ?item wdt:P31 wd:Q5 . ?item wdt:P19 wd:Q1773 . ?item p:P569 ?statement . ?statement wikibase:rank ?rank ; ps:P569 ?birthdate . MINUS { ?statement wikibase:rank wikibase:DeprecatedRank } . ?item wdt:P1368 ?lnb . SERVICE wikibase:label { bd:serviceParam wikibase:language "lv,mul,en". } } ORDER BY ?itemLabel ?birthdate
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Persons born in Riga with LNB ID and with a birthdate (all values except deprecated ones)
SELECT ?item ?itemLabel ?lnb ?birthdate ?rank
wHERE {
?item wdt:P31 wd:Q5 .
?item wdt:P19 wd:Q1773 .
?item p:P569 ?statement .
?statement wikibase:rank ?rank ; ps:P569 ?birthdate .
MINUS { ?statement wikibase:rank wikibase:DeprecatedRank } .
?item wdt:P1368 ?lnb .
SERVICE wikibase:label { bd:serviceParam wikibase:language "lv,mul,en". }
}
ORDER BY ?itemLabel ?birthdate
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?birthdate"):::projected
v3("?item"):::projected
v1("?itemLabel"):::projected
v6("?lnb"):::projected
v5("?rank"):::projected
v4("?statement")
c8(["wikibase:DeprecatedRank"]):::iri
c13(["lv,mul,en"]):::literal
c11(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
c4(["wd:Q1773"]):::iri
v3 --"p:direct/P31"--> c2
v3 --"p:direct/P19"--> c4
v3 --"p:P569"--> v4
v4 --"wikibase:rank"--> v5
v4 --"p:statement/P569"--> v2
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v4 --"wikibase:rank"--> c8
end
v3 --"p:direct/P1368"--> v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end