My PostgreSQL Quiz

The ultimate place to learn PostgreSQL!

Question #3: What is output by the SQL below?

DROP TABLE IF EXISTS foo;
CREATE TABLE foo (a INT, b INT, c INT);
INSERT INTO foo VALUES (1,2,3);
INSERT INTO foo SELECT * FROM foo;
INSERT INTO foo SELECT * FROM foo;
SELECT sum(b) FROM foo;