What is the {gas giant} with the {MAX(synodic period)} whose {part of} is {Solar System}  ?
Which of the planets made entirely of gas in our solar system, has the synodic period that's the largest?
Which gas giant in the solar system has the biggest synodic period?
SELECT ?x WHERE { ?x property:part_of resource:Solar_System . ?x rdf:type ontology:gas_giant . ?x property:synodic_period ?t }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q121750>.

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

}
ORDER BY DESC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q121750 . ?ent wdt:P4341 ?obj . ?ent wdt:P361 wd:Q544 } ORDER BY DESC(?obj)LIMIT 5 