What is {area} of {Western Visayas} that is {end time} is {2017-8-9} ?
in 2017 what was Western Visayas?
For what Western Visayas is it 2017
SELECT ?e WHERE { resource:Western_Visayas property:area ?l . ?l property:end_time ?n . ?l property:area ?e . FILTER ( CONTAINS ( YEAR ( ?n ) , '2017' ) ) }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q13665> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P2046> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <2017-8-9>
} 

SELECT ?obj WHERE { wd:Q13665 p:P2046 ?s . ?s ps:P2046 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'2017')) }