What is {position held} of {Justin Trudeau} that is {start time} is {2008-10-14} ?
On October 14th, 2008 Justin Trudeau was elected to what office?
What position was Justin Trudeau elected to on October 14th, 2008?
SELECT ?a WHERE { ?h property:start_time ?z . resource:Justin_Trudeau property:position_held ?h . ?h property:position_held ?a . FILTER ( CONTAINS ( YEAR ( ?z ) , '2008' ) ) }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q3099714> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P39> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P580> <2008-10-14>
} 

SELECT ?obj WHERE { wd:Q3099714 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P580 ?x filter(contains(YEAR(?x),'2008')) }