In this example we have 3 related tables on a SQLite database:
CREATE TABLE test1 ( c1 integer, primary key (c1) ); CREATE TABLE test2 ( c1 integer,
This is a simple misplacement of your ON statement. This conforms to SQL standard:
ON
SELECT * FROM test1 a LEFT OUTER JOIN test2 b ON b.c1=a.c1 LEFT OUTER JOIN test3 c ON c.c2=b.c2
This is explained in further depth here.