title: Date find from table
body: <p>I have two tables milestone and ioi.
  I have to find the date from ioi and if it is not there then i need to take date from milestone table. In IOI i have submitted date and in milestone I have Actual,forecast and baseline date.
  If submitted date is not present then i need to choose the date from milestone in the availability order actual, forecast and baseline</p>
  
  <p>Milestone:</p>
  
  <pre><code>Project_id actual_date baseline_date forecast_date
  1          15-10-2018  null          12-07-2018
  2          null        null          10-05-2018
  </code></pre>
  
  <p>IOI:</p>
  
  <pre><code>Project Id submitted_dt
  1          15-09-2018
  2          Null
  </code></pre>
  
  <p>For project id 1 it should be 15-09-2018
  For project id 2 it should be 10-05-2018</p>