What is the {spacecraft} with the {MAX(orbital period)} ?
What spacecraft stayed in orbit the longest?
What spacecraft has the longest orbital period?
SELECT ?i WHERE { ?i rdf:type ontology:spacecraft . ?i property:orbital_period ?w }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q40218>.
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?ent .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P2146>.
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .}
ORDER BY DESC(?obj)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q40218 . ?ent wdt:P2146 ?obj } ORDER BY DESC(?obj)LIMIT 5 
Apollo 8