query: SELECT DISTINCT ?country1Label ?country2Label ?capital1Label ?capital2Label ?distance WHERE {
    ?country1 wdt:P31 wd:Q6256 ;
              wdt:P36 ?capital1 .
  
    ?country2 wdt:P31 wd:Q6256 ;
              wdt:P36 ?capital2 .
    
    ?capital1 wdt:P625 ?coords1 .
    ?capital2 wdt:P625 ?coords2 .
    
    BIND(ROUND(geof:distance(?coords1, ?coords2)) AS ?distance) .
    FILTER (?distance>19000)
    
    FILTER(xsd:string(?capital1) < xsd:string(?capital2)) 
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
  }
  ORDER BY DESC(?distance)