SELECT MIN(a.ID) ID, a.name, SUM(b.Price) Price
FROM table1 a
INNER JOIN table2 b
ON a.PID = b.PID
GROUP BY a.Name
AUSGABE
╔════╦══════╦═══════╗
║ ID ║ NAME ║ PRICE ║
╠════╬══════╬═══════╣
║ 1 ║ ram ║ 4333 ║
║ 2 ║ rani ║ 2000 ║
╚════╩══════╩═══════╝