SELECT ?x ( MAX( ?value ) AS ?max ) WHERE { ?x ?value . } GROUP BY ?x