fork download
  1. Create table hoge(name text primary key, suryo int, tanka int);
  2. Insert into hoge values ('apple', 3, 120), ('orange', 2, 140), ('peach', 1, 100);
  3. Select name, sum(suryo * tanka) as '総和' from hoge group by name;
  4.  
Success #stdin #stdout 0s 4532KB
stdin
Standard input is empty
stdout
apple|360
orange|280
peach|100