What is the {constitutional republic} with the {MAX(Gini coefficient)} whose {diplomatic relation} is {Russia}  ?
What constitutional republic who has a diplomatic relation with Russia has the MAX Gini coefficient?
Which is the {constitutional republic} with the {MAX(Gini coefficient)} whom {diplomatic relation} is {Russia} ?
SELECT ?j WHERE { ?j property:diplomatic_relation resource:Russia . ?j rdf:type ontology:constitutional_republic . ?j property:Gini_coefficient ?d }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q1520223>.

?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?ent .
?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1125>.
?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj1.

?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?ent .
?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P530> .
?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q159> .

}
ORDER BY DESC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q1520223 . ?ent wdt:P1125 ?obj . ?ent wdt:P530 wd:Q159 } ORDER BY DESC(?obj)LIMIT 5 
United States of America United States of America South Korea