select col1, SUM(col2) as col2, SUM(col3) as col3 from table1 group by col1
"select col1, MAX(col2) *2 - SUM(col2) as col2,MAX(col3) * 2 - SUM(col3) as col3 from table1 group by col1"
SELECT col1, MAX(col2)*2-col2 as col2, MAX(col3)*2-col3 as col3 FROM ( select col1, SUM(col2) as col2, SUM(col3) as col3 from table1 group by col1 ) AS T GROUP BY col1;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)