I have a estoque
table where records of all supplies are stored, with the stock-in date , the supply code , and unit value of the part, my need would be to get the highest unit value of the most recent date of each supply:
Data | Suprimento | Valor
08/02/18 | A | 150,00
08/02/18 | A | 255,00
06/02/18 | A | 300,00
02/02/18 | B | 100,00
Return:
Data | Suprimento | Valor
08/02/18 | A | 255,00
02/02/18 | B | 100,00
In other words, I want to select the item with the highest value of the most recent date, worrying about getting the largest date and the highest value within that date, different from the example mentioned that only cares about getting the most amount. >