title: Compare first row to other rows
body: <p>The issue I face that I need after selecting multiple rows,to loop over each row and fetch those who have some related information to the first row.</p>
  
  <p>Example:</p>
  
  <pre><code>select NAME,ENGLISH_GRADE,FRANCE_GRAE
  from (some complex query that have order by and returns 100 rows) WHOLE_ROWS
  where
  
  //Here I need to loop over WHOLE_ROWS and make something like that:
  //if(currentRow.ENGLISH_GRADE==WHOLE_ROWS(0).ENGLISH_GRADE)
  //fetch this row
  </code></pre>