~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/aggregatefunctions.rst

  • Committer: Lee Bieber
  • Date: 2011-01-25 20:11:28 UTC
  • mfrom: (2114.1.5 build)
  • Revision ID: kalebral@gmail.com-20110125201128-zhhu9kgcmmv2p11y
Merge Lee - 706121: innodb.innodb_bug53756.test relies on functionality not provided by test-run.pl
Merge Monty - Added inter-plugin dependencies for controlling plugin load order
Merge Marisa - 684803: Need to update Drizzledump documentation with migration conversions / caveats
Merge Marisa - 686641: Need to document removal of multi-table update/delete from Drizzle

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Aggregate Functions
2
 
===================
3
 
 
4
 
SQL group (aggregate) functions operate on sets of values. If you use an aggregate function in a statement containing no GROUP BY clause, it is equivalent to grouping on all rows.
5
 
 
6
 
General syntax for aggregate functions is: ::
7
 
 
8
 
        SELECT "function type" ("column_name")
9
 
        FROM "table_name";
10
 
 
11
 
The following are examples of aggregate functions:
12
 
 
13
 
**AVG**:  Return the average value of the argument. (Does not work with temporal values unless first converted to numeric values.)
14
 
 
15
 
:doc:`count`
16
 
(DISTINCT):  Return the count of a number of different values
17
 
 
18
 
:doc:`count`:  Return a count of the number of rows returned
19
 
        
20
 
**GROUP_CONCAT**:  Return a concatenated string
21
 
 
22
 
**MAX**:  Return the maximum value
23
 
 
24
 
**MIN**:  Return the minimum value
25
 
 
26
 
**STD**:  Return the population standard deviation
27
 
 
28
 
**STDDEV_POP**:  Return the population standard deviation
29
 
 
30
 
**STDDEV_SAMP**:  Return the sample standard deviation
31
 
 
32
 
**STDDEV**:  Return the population standard deviation
33
 
 
34
 
**SUM**:  Return the sum. (Does not work with temporal values unless first converted to numeric values.)
35
 
 
36
 
**VAR_POP**:  Return the population standard variance
37
 
 
38
 
**VAR_SAMP**:  Return the sample variance
39
 
 
40
 
**VARIANCE**:  Return the population standard variance
41
 
 
42
 
.. toctree::
43
 
   :hidden: 
44
 
 
45
 
   count