prefix mon: SELECT ?C (?P/?A AS ?Density) FROM WHERE { ?C a mon:Country; mon:population ?P; mon:area ?A } ORDER BY DESC(?Density)