SQL Server Note

最小/最大/合計/平均

SELECT POINT FROM CUSTOMER
POINT
5.6
3.5
4.0
NULL
8.2
SELECT MIN(POINT) AS [MINPOINT] FROM CUSTOMER
MINPOINT
3.5
SELECT MAX(POINT) AS [MAXPOINT] FROM CUSTOMER
MAXPOINT
8.2
SELECT SUM(POINT) AS [SUMPOINT] FROM CUSTOMER
SUMPOINT
21.3
SELECT AVG(POINT) AS [AVGPOINT] FROM CUSTOMER
AVGPOINT
5.325000
Copyright © 2006 Hikijishi All Rights Reserved.
[] [sql][0.00108098983764648]