title: Retain values from top rows
body: <p>I have a table with three fields: Fruit, Color and Grade. For all fruits, the grade is 1. </p>
  
  <p>The question I have is: </p>
  
  <p>For all the entries having grade 1, I want to retain the first color from the top row. But if the same kind of fruit shows twice, then retain the second color of this fruit for the rest of records.  </p>
  
  <p>Table 1: </p>
  
  <pre><code>Fruit      Color   Grade
  ------------------------
  Apple      Green   1
  Apple      Red     1
  Cherry     Yellow  1 
  Strawberry Yellow  1
  </code></pre>
  
  <p>Ideal Table 2:</p>
  
  <pre><code>Fruit      Color   Grade
  ------------------------
  Apple      Green   1
  Apple      Red     1
  Cherry     Red     1
  Strawberry Red     1 
  </code></pre>
  
  <p>Can anyone help out? </p>
  
  <p>Thanks lots!</p>