what is the {latest date} for {Gregory VII} has {date of birth} as {1020-1-1} ?
Is it true that Gregory VII was born in 1020?
What was Gregory VII's date of birth in the year 1020?
SELECT ?f WHERE { ?f property:latest_date ?f . FILTER ( CONTAINS ( YEAR ( ?g ) , '1020' ) ) . resource:Gregory_VII property:date_of_birth ?f . ?f property:date_of_birth ?g }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q133063> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P569> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <1020-1-1> .
?statement <http://www.wikidata.org/entity/P1326> ?value. 
} 

SELECT ?value WHERE { wd:Q133063 p:P569 ?s . ?s ps:P569 ?x filter(contains(YEAR(?x),'1020')) . ?s pq:P1326 ?value}