What is the {asteroid} with the {MAX(periapsis)} whose {site of astronomical discovery} is {Landessternwarte Heidelberg-Königstuhl}  ?
What is asteroid discovered in Landessternwarte Heidelberg-Königstuhl had the closest periapsis?
What is the asteroid with the highest periapsis whose site of astronomical discovery is Landessternwarte Heidelberg-Königstuhl ?
SELECT ?f WHERE { ?f property:periapsis ?h . ?f property:site_of_astronomical_discovery resource:Landessternwarte_Heidelberg-Königstuhl . ?f rdf:type ontology:asteroid }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q3863>.

?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/P2244>.
?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/P65> .
?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q27115> .

}
ORDER BY DESC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q3863 . ?ent wdt:P2244 ?obj . ?ent wdt:P65 wd:Q27115 } ORDER BY DESC(?obj)LIMIT 5 
624 Hektor 1437 Diomedes 911 Agamemnon 1143 Odysseus 1208 Troilus