Aggregate Functions
COUNT
Returns the number of rows matching the query criteria.
SELECT COUNT(*) FROM Issues WHERE ContentRaw = 'Bug'
COUNT(DISTINCT)
Returns the number of distinct, non-null field values matching the query criteria.
SELECT COUNT(DISTINCT Title) AS DistinctValues FROM Issues WHERE ContentRaw = 'Bug'
AVG
Returns the average of the column values.
SELECT ContentRaw, AVG(AnnualRevenue) FROM Issues WHERE ContentRaw = 'Bug' GROUP BY ContentRaw
MIN
Returns the minimum column value.
SELECT MIN(AnnualRevenue), ContentRaw FROM Issues WHERE ContentRaw = 'Bug' GROUP BY ContentRaw
MAX
Returns the maximum column value.
SELECT ContentRaw, MAX(AnnualRevenue) FROM Issues WHERE ContentRaw = 'Bug' GROUP BY ContentRaw
SUM
Returns the total sum of the column values.
SELECT SUM(AnnualRevenue) FROM Issues WHERE ContentRaw = 'Bug'