title: Using Oracle Rank function
body: <p>select product_name,start_tm,end_tm,load_date,bus_dt from A.product</p>
  <p>Output :</p>
  <pre><code>Product_name   start_tm              end_tm               Load_date    bus_dt
  Pencil        01-jul-21 12:00 am     01-jul-21 12:30 am   03-jul-21    01-jul-21
  Pencil        01-jul-21 04:00 am     01-jul-21 04:30 am   03-jul-21    01-jul-21
  Eraser        01-jul-21 01:00 am     01-jul-21 01:30 am   01-jul-21    02-jul-21
  Eraser        01-jul-21 04:00 am     01-jul-21 04:30 am   02-jul-21    02-jul-21
  </code></pre>
  <p>If Product is Eraser then output should be latest load_date</p>
  <pre><code>Product_name   start_tm              end_tm               Load_date    bus_dt
  Eraser        01-jul-21 04:00 am     01-jul-21 04:30 am   02-jul-21    02-jul-21
  </code></pre>
  <p>If Product is Eraser then output should be latest load_date since load_date as same
  for product Pencil then it should look for Max end_tm</p>
  <pre><code>Product_name   start_tm              end_tm               Load_date    bus_dt
  Pencil        01-jul-21 04:00 am     01-jul-21 04:30 am   03-jul-21    01-jul-21
  </code></pre>
  <p>how to achieve it using Rank?</p>