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

Comments

Popular posts from this blog

Docker : Adding Docker Repository Key and Updating Docker To The Latest Version

ASP.NET Core : Adding The Default View With _ViewStart.cshtml

Enable ASP.NET Core to Serve Static Files