what is the {statement is subject of} for {Ukraine} has {diplomatic relation} as {Latvia} ?
How are the diplomatic relations between Ukraine and Latvia?
What are the diplomatic relations between Ukraine and Latvia?
SELECT ?f WHERE { ?r property:diplomatic_relation resource:Latvia . resource:Ukraine property:diplomatic_relation ?r . ?r property:statement_is_subject_of ?f }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q212> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P530> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q211> .
?statement <http://www.wikidata.org/entity/P805> ?value. 
} 

SELECT ?value WHERE { wd:Q212 p:P530 ?s . ?s ps:P530 wd:Q211 . ?s pq:P805 ?value}