2012-05-14から1日間の記事一覧

グループ中の中の最大値をもったレコードの抽出

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;