ADO.NET Provider for Paylocity

Build 24.0.9062

集計関数

COUNT

クエリ条件に一致する行の数を返します。

SELECT COUNT(*) FROM Employee WHERE EmployeeId = '1234'

COUNT(DISTINCT)

クエリ条件に一致する、null 以外の個別のフィールド値の数を返します。

SELECT COUNT(DISTINCT FirstName) AS DistinctValues FROM Employee WHERE EmployeeId = '1234'

AVG

カラムの値の平均を返します。

SELECT LastName, AVG(AnnualRevenue) FROM Employee WHERE EmployeeId = '1234'  GROUP BY LastName

MIN

カラムの値の最小値を返します。

SELECT MIN(AnnualRevenue), LastName FROM Employee WHERE EmployeeId = '1234' GROUP BY LastName

MAX

カラムの値の最大値を返します。

SELECT LastName, MAX(AnnualRevenue) FROM Employee WHERE EmployeeId = '1234' GROUP BY LastName

SUM

カラムの値の合計を返します。

SELECT SUM(AnnualRevenue) FROM Employee WHERE EmployeeId = '1234'

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9062