
USE pandas;

DROP TABLE IF EXISTS account;
CREATE TABLE account (acct_num INT, amount DECIMAL(10,2));

DROP TRIGGER IF EXISTS inserted_sum;

CREATE TRIGGER inserted_sum BEFORE INSERT ON account 
FOR EACH ROW SET @sum = @sum + NEW.amount;

