query-7558348057a57c7bd7565549975ba579
People not born in...Hello! I have this query to detect people born in the Basque Country (that is not an state, so we use parts... and so on) in the selected day (november 16th in this example).
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item
WHERE {
?date_node wikibase:timePrecision "11"^^xsd:integer .
?date_node wikibase:timeValue ?date .
FILTER (year(?date) > 1 && day(?date) = (16) && month(?date) = (11))
?item p:P569/psv:P569 ?date_node .
?item wdt:P19 ?pob.
?pob wdt:P131* ?parts.
wd:Q47588 wdt:P527 ?parts.
OPTIONAL {?item wdt:P570 ?dod}
?item wdt:P31 wd:Q5 .
}
ORDER BY ASC(?date) ?item LIMIT 4999
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?date")
v3("?date_node")
v6("?dod")
v2("?item"):::projected
v5("?parts")
v4("?pob")
a1((" "))
c3(["11^^xsd:integer"]):::literal
c10(["wd:Q47588"]):::iri
c14(["wd:Q5"]):::iri
f0[["year-from-dateTime(?date) > '1^^xsd:integer'day-from-dateTime(?date) = '16^^xsd:integer'month-from-dateTime(?date) = '11^^xsd:integer'"]]
f0 --> v1
v3 --"wikibase:timePrecision"--> c3
v3 --"wikibase:timeValue"--> v1
v2 --"p:P569"--> a1
a1 --"p:statement/value/P569"--> v3
v2 --"p:direct/P19"--> v4
v4 --"p:direct/P131"--> v5
c10 --"p:direct/P527"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P570".-> v6
end
v2 --"p:direct/P31"--> c14