title: SQL three table joins using two ids and another column
body: <p>I have three tables</p>
  <pre><code>t1    t2     t3
  </code></pre>
  <p>I want to select data from only two of the tables but need the ids and columns from other tables for reference.</p>
  <p>How to select data from t3  and t2</p>
  <pre><code>WHERE t1.id = t2.id = t3.id
    AND t1.fid = t2.fid = t3.fid 
    AND t1.type = 'abc'
  </code></pre>
  <p><code>id</code> column will be the same value for all tables. <code>fid</code> column will have incremental fid's but need the ones where t1.type = 'abc' also</p>
  <p>Would this work?</p>
  <pre><code>select data 
  from t3 
  
  select data 
  from t2 
  join on t1.id = t2.id and t2.id = t3.id 
  join on t1.fid = t2.fid and t2.fid = t3.fid and t1.type = 'abc'
  where id = 1
  </code></pre>