title: find max compared in current year and previous years
body: <p>Hello i am trying to execute a query wherein i need the max weight of the fish according to the each line weight </p>
  
  <p>i.e if the line weight of a fish is 60 and weight caught is 100 and 200,it should show up only the 200 value and not the 100 value similarly this goes on for all other fishes in the table.</p>
  
  <p>I need to also compare the previous records to the current records(1st JULY to 30 JUNE) and display which record is maximum eg. the record should be overwritten to the new highest record by getting compared to the previous records.</p>
  
  <p>The query till now is as shown in </p>
  
  <p><a href="http://sqlfiddle.com/#!2/5f2c76/8" rel="nofollow">http://sqlfiddle.com/#!2/5f2c76/8</a> </p>
  
  <p>Here i need the table to be as follows:</p>
  
  <pre><code>Date            Name  Weight  Line Weight
  
  1970-01-01       abc   200     60 
  2014-08-29       abc   100     20 
  2000-06-02       abc   100     10 
  2008-06-02       pqr   300     60 
  2008-06-02       pqr   100     20 
  </code></pre>
  
  <p>I am using this into a php webpage,if the sql query is not available please help me with a php view for the same</p>
  
  <p>Please help</p>