title: mysql complex select, left join
body: <p>I have 3 tables, a,b,c </p>
  
  <p>It is possible to add left join for two table select add 3rd table by left join:</p>
  
  <p>example:</p>
  
  <pre><code>SELECT * from a,b where  a.x=b.x and a.z=b.z and b.y&gt;0 
  </code></pre>
  
  <p>(there I need  select only that records where I can found exact matches by that rules)</p>
  
  <p>now  I want  add some fields from 3rd table, but there are possible situation that 3rd table may  not contain data for some  table   a,b records. As I understand I can use left join ?</p>
  
  <p>I How can select something this:</p>
  
  <pre><code>SELECT a.*,b.*, c.Q from a,b where  a.x=b.x and a.z=b.z and b.y&gt;0  left join c on a.x=c.x 
  </code></pre>