query-c8bbf3c67aa906896816e0dcac0a1ce4
Find people who were born in summerMy goal is to find people via wikidata who were born in summer. What works for 1983 is this FILTER((?birth > "1983-06-20"^^xsd:dateTime) && (?birth < "1983-10-31"^^xsd:dateTime))If I want to add a year-span, like 1983 to 2000, how do I do it? But I want it to filter for every year, ie not just 1983. How do I change the line? ).contribs • talk (92.228.170.159 comment was added byunsignedThe preceding – ]reply[09:05, 26 January 2017 (UTC) Jura--- https://www.w3.org/TR/sparql11-query/#func-date-timeHave a look at Just share the command. But there were no matching records found FILTER(year(?birth) > 1983) FILTER(month(?birth) < 10 && day(?birth) < 31) FILTER(month(?birth) > 06 && day(?birth) > 20).I did That's odd, personally, I keep getting time-outs. The way around that is probably to check day-precision dates only.
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/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?date
{
{ SELECT ?item ?date
{
?date_node wikibase:timePrecision "11"^^xsd:integer .
?date_node wikibase:timeValue ?date .
FILTER (year(?date) > 1983 && month(?date) > 6 && month(?date) < 10 )
?item p:P569/psv:P569 ?date_node .
}
LIMIT 1000
}
?item wdt:P31 wd:Q5 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}