query-c8bbf3c67aa906896816e0dcac0a1ce4

rq turtle/ttl

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

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" . }
    }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?date"):::projected v2("?date_node") v3("?item"):::projected a1((" ")) c5(["11^^xsd:integer"]):::literal c14(["en"]):::literal c12(["bd:serviceParam"]):::iri c10(["wd:Q5"]):::iri f0[["year-from-dateTime(?date) > '1983^^xsd:integer'month-from-dateTime(?date) > '6^^xsd:integer'month-from-dateTime(?date) < '10^^xsd:integer'"]] f0 --> v1 v2 --"wikibase:timePrecision"--> c5 v2 --"wikibase:timeValue"--> v1 v3 --"p:P569"--> a1 a1 --"p:statement/value/P569"--> v2 v3 --"p:direct/P31"--> c10 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end