1 2 3 4 5 6 7 8 9
USE plato; select key, min(value), max(value), from Input group by key order by key;