> Great! Please cc: the docs or hackers mailing lists to make sure the
authorBruce Momjian
Tue, 20 Jun 2000 18:04:18 +0000 (18:04 +0000)
committerBruce Momjian
Tue, 20 Jun 2000 18:04:18 +0000 (18:04 +0000)
> patches are not lost...

Aggregate doc patches:

The patches are attached. Be great if you could check them over to make
sure all relevant content (and markup) is there...

Isaac Wilcox

doc/src/sgml/func.sgml
doc/src/sgml/sql.sgml
doc/src/sgml/syntax.sgml

index 3b50375e160facc58677fb6956e29511a0830a2e..0023a28b0aa323100000525b626b6f778b03be94 100644 (file)
@@ -1515,6 +1515,87 @@ Not defined by this name. Implements the intersection operator '#'
 
   
 
+  
+
+   Aggregate Functions
+
+   
+    Author
+    
+     Written by Isaac Wilcox
+     on 2000-06-16.
+    
+   
+
+   
+    Aggregate functions allow the generation of simple
+    statistics about the values of particular columns over the selected set
+    of rows. See also  and
+    .
+   
+
+   
+    
+     Aggregate Functions
+     
+      
+       
+        Function
+        Returns
+        Description
+        Example
+        Notes
+       
+      
+      
+       
+        COUNT(*)
+        int4
+        Counts the selected rows.
+        COUNT(*)
+        
+       
+       
+        COUNT(column-name)
+        int4
+        Counts the selected rows for which the value of column-name is not NULL.
+        COUNT(age)
+        
+       
+       
+        SUM(column-name)
+        Same as the data type of the column being summed.
+        Finds the total obtained by adding the values of column-name across all selected rows.
+        SUM(hours)
+        Summation is supported on the following data types: int8, int4, int2, float4, float8, money, interval, numeric
+       
+       
+        MAX(column-name)
+        Same as the data type of the column whose maximum value is sought.
+        The maximum value of column-name across all selected rows.
+        MAX(age)
+        Finding the maximum value is supported on the following data types: int8, int4, int2, float4, float8, date, time, timetz, money, timestamp, interval, text, numeric.
+       
+       
+        MIN(column-name)
+        same as the data type of the column whose minimum value is sought.
+        The minimum value of column-name across all selected rows.
+        MIN(age)
+        Finding the minimum value is supported on the following data types: int8, int4, int2, float4, float8, date, time, timetz, money, timestamp, interval, text, numeric.
+       
+       
+        AVG(column-name)
+        Same as the data type of the column being averaged.
+        The average (mean) of the values in the given column across all selected rows.
+        AVG(age)
+        Finding the mean value is supported on the following data types: int8, int4, int2, float4, float8, money, interval, numeric. Note that as the return type is the same as that of the data being averaged, using AVG() on discrete data will give a rounded result.
+       
+      
+     
+    
+   
+  
+
  
 
 
 
  
@@ -1032,7 +1032,7 @@ SELECT S.SNAME, P.PNAME
     
 
     
-     Aggregate Operators
+      id="aggregates-tutorial">Aggregate Operators
 
      
       SQL provides aggregate operators
index f07da189173f82b5f330bbddf49320fdb17736c3..6c9ccaf45e51223bb570aa30dd9170bbb6a62a8b 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -747,7 +747,7 @@ sqrt(emp.salary)
    
 
    
-    Aggregate Expressions
+     id="aggregates-syntax">Aggregate Expressions
 
     
      An aggregate expression represents the application