title: Selecting products that haven't been made in 2 years
body: <p>I'm trying to get the products that havn't been made in the last 2 years. I'm not that great with SQL but here's what i've started with and it doesn't work.</p>
  
  <p>Lets say for this example that my schema looks like this</p>
  
  <p>prod_id, date_created, num_units_created. </p>
  
  <p>I'll take any advice i can get.  </p>
  
  <pre><code>select id, (select date from table
              where date &lt;= sysdate - 740) older,
             (select date from table
              where date &gt;= sysdate - 740) newer 
  from table 
  where newer - older
  </code></pre>
  
  <p>I'm not being clear enough. </p>
  
  <p>Basically i want all products that havn't been produced in the last 2 years. Whenever a product is produced, a line gets added. So if i just did sysdate &lt;= 740, it would only give me all the products that were produced from the beginning up til 2 years ago. </p>
  
  <p>I want all products that have been produced in the at least once, but not in the last 2 years. </p>
  
  <p>I hope that clears it up. </p>