What is {head of state} of {Tenochtitlan} that is {end time} is {1520-12-3} ?
On December 3rd 1520 who presided over Tenochtitilan
Who was the head of state for Tenochtitlan on December 3, 1520?
SELECT ?w WHERE { resource:Tenochtitlan property:head_of_state ?l . ?l property:end_time ?b . FILTER ( CONTAINS ( YEAR ( ?b ) , '1520' ) ) . ?l property:head_of_state ?w }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q13695> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P35> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <1520-12-3>
} 

SELECT ?obj WHERE { wd:Q13695 p:P35 ?s . ?s ps:P35 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1520')) }