title: SELECT all the latest non null records available based on date range in another table
body: <p>Following on from this question <a href="https://stackoverflow.com/questions/1740280/select-all-the-newest-record-distinct-keyword-with-a-non-null-value-in-one-colum">SELECT all the newest record distinct keyword with a non null value in one column</a></p>
  
  <p>I now have a problem where I have this data</p>
  
  <pre><code>PRODUCT:
      id| product | amount| ownershipid
      1 | ipod    | 200   | 2
      2 | ipod    | 250   | 3
      3 | ipod    | 150   | 4
      4 | apple   | 100   | 1
      5 | apple   | 98    | 2
      6 | apple   | 500   | 3
      7 | itunes  | NULL  | 1
      8 | itunes  | 50    | 2
      9 | itunes  | NULL  | 3
     10 | itunes  | NULL  | 4
  
  OWNERSHIP:
        ownershipid| start      | end
          1        | 2011-01-01 | 2011-12-31
          2        | 2012-01-01 | 2012-12-31
          3        | 2014-01-01 | 2014-12-31
          4        | 2013-01-01 | 2013-12-31
  </code></pre>
  
  <p>I need the most recent amount available for each product. I can not do an order by on ownershipId as the most recent data is from 2014. not from 2013. <em>OwnershipId is Autoincrement and we accept historic data.</em></p>
  
  <p>So, my result should return rows 2, 6 and 8.</p>