MySQL Conference

O’Reilly Media will be hosting the MySQL Conference in Santa Clara, California: April 12 - 15, 2010.

MySQueaL Resources

resources for mysql admins and developers who are squealing for help
site last updated:
04 mar. 2010 - 10:45:30 am


1283 hits past day

MySQL Aggregate Functions

MySQL aggregate functions are used to return totals, averages, and other statistical information from MySQL. Data is grouped together based on specified columns.

AVG( )

This MySQL function returns the average or mean of a set of numbers given as the argument.

BIT_AND( )

This MySQL function returns the bitwise AND for all bits for the expression given. I'll confess here: I really have no idea what this does, although I wrote something about it. I just don't get these bitwise functions. So please let me know what they do if you know.

BIT_OR( )

This MySQL function returns the bitwise OR for all bits for the expression given. It calculates with a 64-bit precision (BIGINT).

BIT_XOR( )

This MySQL function returns the bitwise XOR (exclusive or) for all bits for the expression given. It calculates with a 64-bit precision (BIGINT).

COUNT( )

This MySQL function returns the number of rows retrieved in the SELECT statement for the given column. By default, rows in which the column is NULL are not counted. If the wildcard * is used as the argument, the function counts all rows, including ones with NULL values.

GROUP_CONCAT( )

This MySQL function returns non-NULL values of a group concatenated by a GROUP BY clause, separated by commas.

MAX( )

This MySQL function returns the highest number in the values for a given column.

MIN( )

This MySQL function returns the lowest number in the values for a given column.

STD( )

This MySQL function returns the population standard deviation of the given column.

STDDEV( )

This MySQL function returns the population standard deviation of the given column.

STDDEV_POP( )

This MySQL function returns the population standard deviation of the given column.

STDDEV_SAMP( )

This MySQL function returns the sample standard deviation of the given column.

SUM( )

This MySQL function returns the sum of the values for the given column or expression.

VAR_POP( )

This MySQL function returns the variance of a given column, based on the rows selected as a population.

VAR_SAMP( )

This MySQL function returns the variance of a given column, based on the rows selected as a sample of a given population.

VARIANCE( )

With this MySQL function the variance is determined by taking the difference between each given value and the average of all values given.

Return to previous page of our MySQL Documentation
MySQL columns: everywhere I look are tables and columns; life is filled with databases of information to be ordered and grouped. (St. Peter of Chains Church, Rome, Italy)

special notices

Color Highlights

When you look at SQL statements and functions on the pages for some sections of our documentation for MySQL, you may notice that some are shown in a different color (light blue at the moment). What we've done is set up a log to keep track of which pages of our documentation readers view. From there, our script every few minutes determines the most popular statements and functions and changes the colors of the links to those pages.

Need Math Examples

Although we did well in math classes all through school, we have very little experience with the Math Functions of MySQL very little. As a result, we don't have very good examples for them. If you work in science or engineering and have some ideas for easy to understand examples that we can add, please tell us.