title: How to get data from database in time range if it's not contained before the time range?
body: <p>I have a table that contains some data like:</p>
  
  <ul>
  <li>Product ID</li>
  <li>Operation</li>
  <li>Date </li>
  <li>Result (OK or NOK). </li>
  </ul>
  
  <p>I'd like to set a time range. In that time range I'd like to get the first Result of all Product ID by Date. </p>
  
  <p>After that I'd like to check the whole table (out of the time range too), if there is an earlier test Result of those PID-Operation-Result "pack" what I got from the selected time range. How should I do that?</p>