title: How to make a multi-join query in MySQL?
body: <p>I'm new to SQL, and find I don't quite understand which joins to use when. Sub-queries also seem confusing. I have the following tables set up, and I'm trying to get a specific outcome:</p>
  
  <pre><code>`+--------------------------+   +---------------+  +---------------+  +---------------+`
  `|          Table_A         |   |   Table_B     |  |   Table_C     |  |   Table_D     |`
  `+--------------------------+   +---------------+  +---------------+  +---------------+`
  `| id | f2 | f3 | f4 | d_id |   | a_id  | c_id  |  |  id  |   fc   |  |  id  |   fs   |`
  `+--------------------------+   +---------------+  +---------------+  +---------------+`
  </code></pre>
  
  <p>And this is what I'm trying to get:</p>
  
  <pre><code>`+----------------------------------+`
  `| a.f2 | a.f3 | a.f4 | d.fs | c.fc |`
  `+----------------------------------+`
  </code></pre>
  
  <p>I've found that I can get the first four columns with the following query:</p>
  
  <pre><code>Select t1.f2, t1.f3, t1.f4, t2.fs
      From Table_A AS t1 INNER JOIN Table_D AS t2
      ON t1.d_id = t2.id;
  </code></pre>
  
  <p>How can I get from A.id to C.fc? I can't figure out how to get the fifth column, let alone in conjunction with the previous query. This is about as far as I got with the final column: </p>
  
  <pre><code>Select t1.flow_control
      FROM Table_D AS t1 INNER JOIN policy t2
      ON t1.id = t2.c_id;
  </code></pre>