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