title: sqlite LEFT OUTER JOIN multiple tables
body: <p>In this example we have 3 related tables on a SQLite database:</p>
  
  <pre><code>CREATE TABLE test1 (
      c1 integer,
      primary key (c1)
  );
  CREATE TABLE test2 (
      c1 integer,
      c2 integer,
      primary key (c1, c2)
  );    
  CREATE TABLE test3 (
      c2 integer,
      c3 integer,
      primary key (c2)
  );
  </code></pre>
  
  <p>Now I need to join all tables:</p>
  
  <pre> test1 -> test2 (with c1 column)
            test2 -> test3 (with c2 column).</pre>
  
  <p>I have tried this solution but it doesn't run:</p>
  
  <pre><code>SELECT 
     * 
     FROM test1 a 
          LEFT OUTER JOIN test2 b
                          LEFT OUTER JOIN test3 c
                            ON c.c2 = b.c2 
            ON b.c1=a.c1 
  </code></pre>
  
  <p>It gives me an error:
   <code>near "ON": syntax error.</code></p>
  
  <p>Any help ?</p>