What is {located in the administrative territorial entity} of {Somogy County} that is {end time} is {1989-10-22} ?
what part of smooth area reached an end in the yea 1989 which was situated in the administrat regional element?
What part of Somogy County came to an end in the year 1989 which was located in the administrative territorial entity?
SELECT ?c WHERE { resource:Somogy_County property:located_in_the_administrative_territorial_entity ?p . ?p property:located_in_the_administrative_territorial_entity ?c . FILTER ( CONTAINS ( YEAR ( ?t ) , '1989' ) ) . ?p property:end_time ?t }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q190522> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P131> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <1989-10-22>
} 

SELECT ?obj WHERE { wd:Q190522 p:P131 ?s . ?s ps:P131 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1989')) }