title: SQL mapping from 1 table
body: <p>I have 2 mysql tables that look like this:</p>
  
  <p>Tabel 1 :</p>
  
  <pre><code>ID      NAME
  1       car1
  2       car2
  3       car3
  4       car4
  </code></pre>
  
  <p>Tabel 2 :</p>
  
  <pre><code>car_id      liter
  2           100
  2           300
  3           400
  1           500
  3           600
  </code></pre>
  
  <p>I want to output something like:</p>
  
  <p>Tabel 3:</p>
  
  <pre><code>car_id      liters
  car2        100 
  car2        300
  car3        400
  car1        500
  car3        600
  </code></pre>
  
  <p>I try to write something like:</p>
  
  <pre><code>SELECT tabel2.car_id
       , tabel1.ID 
    FROM tabel2
       , tabel2 
   INNER 
    JOIN tabel3  
      ON tabel2.car_id = tabel1.ID;
  </code></pre>
  
  <p>I know this is kinda a newbie question, but I'm new to SQL.  </p>