FireDAC Components for Open Exchange Rates

Build 21.0.7930

Aggregate Functions

COUNT

Returns the number of rows matching the query criteria.

SELECT COUNT(*) FROM Projects WHERE Id = 'MyId'

COUNT(DISTINCT)

Returns the number of distinct, non-null field values matching the query criteria.

SELECT COUNT(DISTINCT Id) AS DistinctValues FROM Projects WHERE Id = 'MyId'

AVG

Returns the average of the column values.

SELECT Statistics_ViewCount, AVG(Statistics_ViewCount) FROM Projects WHERE Id = 'MyId'  GROUP BY Statistics_ViewCount

MIN

Returns the minimum column value.

SELECT MIN(Statistics_ViewCount), Statistics_ViewCount FROM Projects WHERE Id = 'MyId' GROUP BY Statistics_ViewCount

MAX

Returns the maximum column value.

SELECT Statistics_ViewCount, MAX(Statistics_ViewCount) FROM Projects WHERE Id = 'MyId' GROUP BY Statistics_ViewCount

SUM

Returns the total sum of the column values.

SELECT SUM(Statistics_ViewCount) FROM Projects WHERE Id = 'MyId'

Copyright (c) 2021 CData Software, Inc. - All rights reserved.
Build 21.0.7930