[Solved] get the total values of different user in mysql and php [closed]


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

OUTPUT

╔════╦══════╦═══════╗
║ ID ║ NAME ║ PRICE ║
╠════╬══════╬═══════╣
║  1 ║ ram  ║  4333 ║
║  2 ║ rani ║  2000 ║
╚════╩══════╩═══════╝

solved get the total values of different user in mysql and php [closed]