1: 2: 3:
select t.* from yourtable t where t.SalesDate = ( select max(i.SalesDate) from yourtable i where i.productid = t.productid )