Tech Junkie Blog - Real World Tutorials, Happy Coding!: SQL: SUM() Aggregate Function

Thursday, September 26, 2019

SQL: SUM() Aggregate Function

The SUM() function is used to sum up all the values in the specified column.

SELECT SUM(UnitsInStock) AS TotalInventory
FROM Products

The above query gets the total number of units in stock for all products

No comments:

Post a Comment

Search This Blog