I did search around and I found this SQL selecting rows by most recent date Which is so close to what I want but I can\'t seem to make it work. I get an error Column \'I
select * from ( Select ID, Name, Price, Date, Rank() over (partition by Name order by Date) RankOrder From table ) T where RankOrder = 1