title: Select a row or rows only when a status change in status column in Oracle
body: <p>I have a sample data as below in Oracle Table (CarStatus) on a date range of 01mar14 to 31mar14:</p>
  
  <pre><code>CarID | CarModel | Date    | StatusCode | Duration
  100   | Toyota   | 01Mar14 | Ready      | 24
  100   | Toyota   | 02Mar14 | Ready      | 24
  100   | Toyota   | 03Mar14 | Ready      | 12
  100   | Toyota   | 03Mar14 | Workshop   | 03
  100   | Toyota   | 03Mar14 | Inspection | 09
  100   | Toyota   | 04Mar14 | Inspection | 04
  100   | Toyota   | 04Mar14 | Ready      | 20
  100   | Toyota   | 05Mar14 | Ready      | 24
  ............
  100   | Toyota   | 31Mar14 | Ready      | 24
  200   | Honda    | 01Mar14 | Workshop   | 24
  200   | Honda    | 02Mar14 | Workshop   | 24
  200   | Honda    | 03Mar14 | Workshop   | 10
  200   | Honda    | 03Mar14 | Inspection | 14
  200   | Honda    | 04Mar14 | Inspection | 04
  200   | Honda    | 04Mar14 | Ready      | 20
  200   | Honda    | 05Mar14 | Ready      | 24
  200   | Honda    | 06Mar14 | Ready      | 24
  200   | Honda    | 07Mar14 | Ready      | 24
  ...................
  200   | Honda    | 31Mar14 | Ready      | 24
  </code></pre>
  
  <p>I want the result to only pick up the rows where the values have changed. The output should be:</p>
  
  <pre><code>CarID | CarModel | Date    | StatusCode | Duration
  100   | Toyota   | 01Mar14 | Ready      | 24   
  100   | Toyota   | 03Mar14 | Ready      | 12
  100   | Toyota   | 03Mar14 | Workshop   | 03
  100   | Toyota   | 03Mar14 | Inspection | 09
  100   | Toyota   | 04Mar14 | Inspection | 04
  100   | Toyota   | 04Mar14 | Ready      | 20
  100   | Toyota   | 05Mar14 | Ready      | 24
  200   | Honda    | 01Mar14 | Workshop   | 24   
  200   | Honda    | 03Mar14 | Workshop   | 10
  200   | Honda    | 03Mar14 | Inspection | 14
  200   | Honda    | 04Mar14 | Inspection | 04
  200   | Honda    | 04Mar14 | Ready      | 20
  200   | Honda    | 05Mar14 | Ready      | 24
  </code></pre>
  
  <p>Can anyone help me with the query please? Or the Logic to only pick up the above conditional records? The above duration column is Hrs / day....This table maintains the status of the carID on every day, each hourly basis</p>
  
  <p>Thanks in advance</p>