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