What is the {secular state} with the {MAX(compulsory education (minimum age))} whose {diplomatic relation} is {Australia}  ?
What Australian secular state has MA compulsory education?
What is the secular state with the MA compulsory education (minimum age) whose diplomatic relation is Australia ?
SELECT ?q WHERE { ?q property:compulsory_education_(minimum_age) ?y . ?q property:diplomatic_relation resource:Australia . ?q rdf:type ontology:secular_state }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q859563>.

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

}
ORDER BY DESC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q859563 . ?ent wdt:P3270 ?obj . ?ent wdt:P530 wd:Q408 } ORDER BY DESC(?obj)LIMIT 5 
Brazil Turkey Uruguay People's Republic of China