Create table hoge(name text primary key, suryo int, tanka int); Insert into hoge values ('apple', 3, 120), ('orange', 2, 140), ('peach', 1, 100); Select name, sum(suryo * tanka) as '総和' from hoge group by name;