title: SQL Query to compare two most recently modified row of the same table
body: <p>I am trying to write SQL query for following scenario </p>
  
  <p>This is simple version of my table</p>
  
  <pre>
  ID      Value          modified Date
  
  1      complete        12/18/2014
  3      pending         12/12/2014
  2      complete        12/14/2014
  2      not started     12/10/2014
  1      pending         12/11/2014
  3      not started     12/12/2014
  2      complete        12/16/2014
  1      testing         12/13/2014
  3      complete        12/17/2014
  
  
  </pre>
  
  <p>I am trying to get a list of IDs that has different "value" for two most recent modified date.</p>
  
  <p>For e.g. In above table two most recent date for ID "1" is 12/18/2014 and 12/13/2014,
  corresponding values for that rows are  "complete" and "testing", which are not equal, so that will be in my list. </p>
  
  <p>However ID "2" will not be in the list because latest two modified date (12/14 and 12/16) for "2" has the same value "complete"</p>
  
  <p>so result I want to get is</p>
  
  <pre>
  ID   Value  
  
  1    Complete
  3    Complete
  </pre>
  
  <p>I am using <strong>Oracle database</strong></p>
  
  <p>I am trying since last two days but never got a <strong>One query solution</strong> to present here. </p>
  
  <p>Any help will be appreciated.</p>