集合関数 sum()

 # SELECT sum(point) AS total_point FROM t1;
 $rs = $rs->search(
     {},
     {
         select => [ { sum => 'point' } ],
         as     => ['total_point'],
     }
 );
 my $total_point = $rs->first ? $rs->first->get_column('total_point') : 0;

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS