title: How to use join to get last 15 days unsold products using mysql.
body: <p>I have 2 table( items &amp; transactions ).
  1. <strong>items</strong> which will have current stock. <strong>transactions</strong> will have sold items data. <strong>"item_code"</strong> column is common in both tables.<br>
  I want to use a join query and get all the stocks past 15 days which are not sold even once. 
  This can easily be achieved using nested select but i wanted to used joins to optimize it.<br>
  The problem i am facing while using join is that below code can only show me proper data if at least one transaction record for every item is in table.</p>
  
  <pre><code>SELECT DISTINCT items.code from items LEFT JOIN transactions ON 
      items.code = transactions.itemCode
      WHERE
      transactions.transDate NOT BETWEEN (DATE(NOW())- INTERVAL 15 DAY) AND CURRENT_DATE
      ORDER by transactions.transDate DESC
  </code></pre>
  
  <p>Any help and suggestions will be admired and supported!</p>