~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/aggregatefunctions.rst

  • Committer: Brian Aker
  • Date: 2011-03-27 07:03:49 UTC
  • mfrom: (2252.2.3 drizzle-ga)
  • Revision ID: brian@tangent.org-20110327070349-ihqsw1cl19lu8j65
MergeĀ inĀ staging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Aggregate Functions
2
 
===================
3
 
 
4
 
*SQL aggregate functions are calculated from values in a column, and return a single value.*
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() - Returns the average value
14
 
    * COUNT() - Returns the number of rows
15
 
    * FIRST() - Returns the first value
16
 
    * LAST() - Returns the last value
17
 
    * MAX() - Returns the largest value
18
 
    * MIN() - Returns the smallest value
19
 
    * SUM() - Returns the sum