PROBLEM
I have four game servers that collect data. Entering data into one table. Unfortunately, this causes four entries per stat for a single player.
WHAT I WANT
I want one record and SUM () for certain columns.
I will post an expression that I wrote that does not work, but you will understand what I would like to do.
SELECT DISTINCT( Name ),
Max(Level),
Class,
Sum(Kills),
Sum(Deaths),
Sum(Points),
Sum(TotalTime),
Sum(TotalVisits),
CharacterID
FROM Characters
WHERE Name LIKE '$value%'
OR CharacterID LIKE '$value'
ORDER BY Name ASC;
source
share