I am using the following results table
Results Table
__________________________________________
player_a| player_b | player_c | year
________|________ |__________|___________|
100 150 150 2015
100 -50 -50 2015
100 350 250 2014
200 350 250 2014
What i would like to do is get the sum for each player per year. Using the following Select i get the desired results.
SELECT (
SELECT SUM( player_a )
FROM `results`
WHERE year =2015
) AS player_a_2015, (
SELECT SUM( player_a)
FROM `results`
WHERE year =2014
) AS player_a_2014
How can i get the maximum sum result only ?
ie For player_a should be 300

