MAX & MIN
--==========================================[MAX and MIN]===================================================================
-- MAX aggregate function allows us to select the highest (maximum) value for a certain column.
--Max---------
SELECT MAX(EmailPromotion) AS MaxEmailPromo
FROM Person.Contact
--Min---------
SELECT MIN(EmailPromotion) AS MinEmailPromo
FROM Person.Contact
No comments:
Post a Comment