[pgsql-jp: 38938] Re: グループごとの最大値を持つデータを取得したい

chuuken kenkou ken_ken_1962 @ hotmail.com
2007年 11月 7日 (水) 13:59:43 JST


忠犬です。

group byを使わない方法を提示しておきます。

select * from "test" as x
 where cnt=(select max(cnt) from "test"
                where x.category=category)
 order by category

_________________________________________________________________
月々210円!アカウント有効期限なし、大容量10GB のHotmail Plus 申込みはこちら 
http://get.live.com/mail/options 




pgsql-jp メーリングリストの案内