What is {position held} of {Recep Tayyip Erdoğan} that is {coat of arms image} is {Seal of Prime Ministry of the Republic of Turkey.svg} ?
Recep Tayyip Erdogan held a Prime Ministry of Republic of Turkey designation in which the attire comprised of coat with arms with Seal of Prime Ministry. Name the designation.
What position did Recep Tayyip Erdogan hold that had a coat of arms with the Seal of the Prime Ministry of the Republic of Turkey?
SELECT ?j WHERE { ?o property:coat_of_arms_image ?o . resource:Recep_Tayyip_Erdoğan property:position_held ?o . FILTER ( CONTAINS ( ?o , 'Seal of Prime Ministry of the Republic of Turkey.svg' ) ) . ?o property:position_held ?j }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q39259> .
?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/P94> <Seal of Prime Ministry of the Republic of Turkey.svg>
} 

SELECT ?obj WHERE { wd:Q39259 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P94 ?x filter(contains(?x , 'Seal of Prime Ministry of the Republic of Turkey.svg')) }