找到当前年和前几年的最大值

Hello i am trying to execute a query wherein i need the max weight of the fish according to the each line weight

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.

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.

The query till now is as shown in

http://sqlfiddle.com/#!2/5f2c76/8

Here i need the table to be as follows:

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 

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

Please help