Ver originalWITH T AS(SELECT ROW_NUMBER() OVER(Partition BY ItemCode ORDER BY ShipDate DESC) N, *FROM POR1)SELECT *FROM TWHERE N=1;