How to select only max values in a group in the following set
id  productid  price  year
---------------------------
1   11         0,10   2015
2   11         0,12   2016
3   11         0,11   2017
4   22         0,08   2016
5   33         0,02   2016
6   33         0,01   2017
Expected result for each productid and max year would be
id  productid  price  year
---------------------------
3   11         0,11   2017
4   22         0,08   2016
6   33         0,01   2017
 
     
    