So fügen Sie Felder (Spalten) hinzu:
SELECT col1, col2, col3, (col1+col2+col3) AS Total FROM table;
Um Zeilen zusammenzufügen, verwenden Sie SUM()
aggregiert:
SELECT
userid,
SUM(col1) AS col1_total,
SUM(col2) AS col2_total
FROM table
GROUP BY userid