I am very new to MySQL (I tried groupby, but didnt get the result) This my sample data
ticket year status data
111    2007 1      32
111    2007 2      46
111    2007 3      40
111    2007 4      38
111    2009 1      15
111    2009 2      12
115    2009 1      2 
115    2009 2      5
I want to select the last entry for each company, for each year. Output should be:
ticket year status data
111    2007 4      38 
111    2009 2      12
115    2009 2      5
 
    