query-f7cd018b529b38f1599414d53138b664

rq turtle/ttl

TODO

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/>
SELECT … (YEAR(?date) as ?year)


# événements à une date précise
?item wdt:P585 "+1789-07-14T00:00:00Z"^^xsd:dateTime. 


# événements entre deux dates
FILTER (YEAR(?time) > 1450 && YEAR(?time) < 1454  ) 
FILTER ((?time > "1452-01-01"^^xsd:dat) && (?time < "1452-12-31"^^xsd:dat)). 

#Personnes nées en 1700 avec précision du jour ou du mois
VALUES ?precision { 10 11 }#10 = month precision, 11 = day precision
?item p:P569/psv:P569 [wikibase:timePrecision ?precision; wikibase:timeValue ?time].
FILTER (   YEAR(?time) = 1700 ).

# ???
SELECT DISTINCT (year(?birthdate) as ?birthyear) 

# ???
(CONCAT(SAMPLE(?sKey),": ",STR(YEAR(SAMPLE(?s)))) AS ?start)

# ???
     ?p wdt:P31 wd:Q5 .
     ?p wdt:P106 ?occ .
     ?p p:P569/psv:P569 [
                wikibase:timePrecision "9"^^xsd:integer ; # precision of at least year
                wikibase:timeValue ?birth ];

# ???
BIND(CONCAT(STR(YEAR(?date)),"-",STR(MONTH(?date))) as ?yearmonth).

# ???
?person wdt:P31 wd:Q5;
          p:P570/psv:P570 [
                wikibase:timePrecision ?precision ;
                wikibase:timeValue ?date ;
              ] .
  BIND(CONCAT(STR(YEAR(?date)),"-",STR(MONTH(?date))) as ?yearmonth).
  FILTER( ?date >= "2000-01-01T00:00:00"^^xsd:dateTime )
  FILTER( ?precision >= "10"^^xsd:integer ) # precision of at least month

Query found at