Tech Junkie Sandbox
Sunday, June 19, 2016
SQL: MAX() And MIN() Aggregate Functions
The MAX() function gets the highest value in the specified column, and the MIN() function gets the lowest value in the specified column
SELECT MAX(UnitPrice) AS HighestPrice, MIN(UnitPrice) AS LowestPrice
FROM Products
The query above gets the highest and lowest prices for the Products table in the Northwind database
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment