2 CREATE TABLE person (id INTEGER PRIMARY KEY AUTOINCREMENT,name TEXT,surname TEXT);
4 INSERT INTO person (name,surname) VALUES;
7 CREATE TABLE money (src INTEGER, dst INTEGER, amount INTEGER);
9 INSERT INTO money VALUES;
12 SELECT name || ' ' || surname AS fullname, SUM(amount) as total FROM person JOIN money ON src = id GROUP BY id;