What is the {chemical element} with the {MAX(density)} whose {subclass of} is {period 5}  ?
What is the densest element in subclass period 5?
Which chemical element of subclass period 5 has the highest density?
SELECT ?s WHERE { ?s rdf:type ontology:period_5 . ?s rdf:type ontology:chemical_element . ?s property:density ?t }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q11344>.

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

}
ORDER BY DESC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q11344 . ?ent wdt:P2054 ?obj . ?ent wdt:P279 wd:Q244982 } ORDER BY DESC(?obj)LIMIT 5 
rhodium silver molybdenum cadmium Indium