title: SQL query to compare rows of table comparing a column values
body: <p>I have imported a large CSV file into a table. A sample of the table looks like this</p>
  
  <pre><code>name,      eye,point,field,date,seconds,sensitivity*10,slope,intercept,T*1000
  
  NESSA SONIA ,R,6,4,08-04-09,32658845,160,1.062300e+001,62538,  1282
  NESSA SONIA ,R,6,5,20-05-09,36288632,20, 5.360101e+000,64036,   771
  NESSA SONIA ,R,6,6,02-12-09,53223062,60, 3.425260e+000,64590,   767
  NESSA SONIA ,L,6,4,08-04-09,32658922,230,4.629489e+000,64382,   582
  NESSA SONIA ,L,6,5,20-05-09,36288515,170,2.805373e+000,64901,   511
  NESSA SONIA ,L,6,6,02-12-09,53223059,220,3.528252e+000,64694,  1022
  </code></pre>
  
  <p>I have to compare Right eye and left eye "sensitivity*10" values, with matching point and field values and extract the highest(I mean the rows).</p>
  
  <p>For example I have to compare first row and fourth as the point, field and date are same and extract the fourth as sensitivity is highest. I have a huge file and need to extract all values. Can Anyone help with the sql query, will be highly appreciated.</p>