Sum Function Example

This example uses the Orders table to calculate the total sales for orders shipped to the United Kingdom.

SELECT Sum(UnitPrice*Quantity) AS [Total UK Sales] 
FROM Orders INNER JOIN [Order Details] 
ON Orders.OrderID = [Order Details].OrderID
WHERE (ShipCountry = 'UK');