SUM() in MySQL — How It Works

What the MySQL SUM() function does, with an example.

Published October 20, 2026

SUM() returns the total of a numeric column across matching rows.

Key points

  • Part of standard SQL functions available in MySQL for working with query results

Example

SELECT SUM(total) FROM orders;
More SQL articles