私はこのようなテーブルを持っています:
Table "public.statistics"
id | integer | not null default nextval('statistics_id_seq'::regclass)
goals | hstore |
アイテム:
|id |goals |
|30059 |"3"=>"123" |
|27333 |"3"=>"200", "5"=>"10" |
ハッシュのキーですべての値を集計するにはどうすればよいですか?
私はこのような結果を得たいです:
select sum(goals) from statistics
戻る
|goals |
|"3"=>"323", "5"=>"10" |