Try this:
SELECT MAX(id) as id, name,MAX(price) as price, MAX(priced) as priced
FROM TableName
GROUP BY name
To insert into a table:
INSERT INTO Table2 VALUES
(SELECT MAX(id) as id, name,MAX(price) as price, MAX(priced) as priced
FROM TableName
GROUP BY name)
EDIT
As you say, to merge (insert new and delete others)
INSERT INTO TableName VALUES
(SELECT MAX(id)+1 as id, name,MAX(price) as price, MAX(priced) as priced
FROM TableName
GROUP BY name)
--Now deleting others
DELETE T1 FROM TableName T1, TableName T2 WHERE T1.id < T2.id AND T1.name = T2.name