What is the {synonym} with the {MAX(gestation period)} whose {instance of} is {synonym}  ?
Which synonym has the highest gestation period whose instance is a synonym?
What is the synonym with the highest gestation period whose instance of is synonym?
SELECT ?d WHERE { ?d property:gestation_period ?p . ?d rdf:type ontology:synonym . ?d rdf:type ontology:synonym }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q1040689>.

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

}
ORDER BY DESC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q1040689 . ?ent wdt:P3063 ?obj . ?ent wdt:P31 wd:Q1040689 } ORDER BY DESC(?obj)LIMIT 5 
Equus caballus Bos grunniens Panthera uncia