グループ中の中の最大値をもったレコードの抽出
select ID ,Val ,extraCol from getMaxRows a where Val = ( select max(b.Val) from getMaxRows b where b.ID = a.ID ) order by ID,extraCol;
select ID ,Val ,extraCol from getMaxRows a where Val = ( select max(b.Val) from getMaxRows b where b.ID = a.ID ) order by ID,extraCol;