MAX & MIN


MAX 和 MIN 的功能就跟命名一樣,分別是取資料的最大值和最小值。

MAX:

SELECT MAX(Price) AS LargestPrice
FROM Products;

MIN:

SELECT MIN(Price) AS SmallestPrice
FROM Products;

results matching ""

    No results matching ""