title: sql left join issue not giving result of non matching from right table
body: <p>i want all records from left table and matching record from right table but below query not giving correct result:</p>
  
  <pre><code>select a.date,b.amt,b.code,c.type
  from (select date from t where date is between '2017-04-01' and '2018-09-30')a
      on a.date = b.date and a.name = b.name left join
      c on c.date = b.date and c.name = b.name or c.name is null
  group by a.date,b.amt,b.code,c.type
  </code></pre>
  
  <p>I cant see value for all code from table b.Its returning only matching from table c</p>