Hatena::Diary::Neko::kak 500 Internal Server Error – countしたものにorder by http://en.yummy.stripper.jp/?eid=448071 DBICではたぶん発行するSQLのカラムに別名をつけられないみたいなので スカラーリファレンスでしかたないんじゃないすかね。 同じことで悩んだ時期もありましたが、いろいろ試してみた結果 order by 句に count(hoge) そのものを指定できることがわかりました。(少なくとも MySQL と SQLite で動作確認済み) $rs = $schema->search( {}, { select => [ 'link', { count => 'entry' } ], group_by => [qw/ link /], order_by => 'count(li