Jose Antonio Esparza Jose Antonio Esparza - 6 months ago 53
SQL Question

get registry with the greatest date

i have a problem, this is my table enter image description here

I want to get the items that are most date, for example:
X_1 sp0127 0.00018
X_2 sp0125 0.004


Oracle? Use a row_number()

select Item, Prov, Costo
select Item, Prov, Costo, row_number() over(partition by Item order by Fecha desc) as Pick_Ord
from Table1
where Pick_Ord =1