|Functions / Aggregation Functions|
Computes the mode value of an aggregation of values. Mode is the most frequent value.
Mode (n )
n is a numeric, string, or date expression.
This query returns the mode and average of each continent's female population.
select Mode(Pop_Fem) as ModePopulation, Avg(Pop_Fem) as Average from countries
Mode is an aggregation function which can only be used in an aggregating SELECT statement. Null values are ignored. If there are only null values supplied in the aggregation, then a null value is returned. In the case of multiple modes, null value is returned.