Difference between revisions of "Average"

From Catglobe Wiki
Jump to: navigation, search
(jrfconvert import)
 
(jrfconvert import)
Line 4: Line 4:
 
====average====
 
====average====
  
Gets numeric values of all the parameters and returns the average value of them. The values of all parameters must be convertible to numbers.
+
Gets double values for row values of the column and calculates the average value of those values.  
 +
 
 +
Returns empty if there is no valid rows
  
 
'''Syntax'''
 
'''Syntax'''
  
average(''exp1, exp2, exp3,'' )
+
average(''columnName'')
  
 
'''Arguments'''
 
'''Arguments'''
  
''exp''i: Is an expression of any type
+
''columnName'': Is the name of a column in the data table.
  
 
'''Return type'''
 
'''Return type'''
  
number
+
number or empty
  
 
'''Examples'''
 
'''Examples'''
  
number a = average(1, 2, 3, 4, 5);
+
//get the average score of all students
 
 
//a = 3
 
 
 
number a = average(1, "3");
 
  
//a = 2
+
number a = average(Score) where (true);
  
 
'''Availability'''
 
'''Availability'''
Line 32: Line 30:
 
Version 4.8
 
Version 4.8
 
__NOTOC__
 
__NOTOC__
<!-- imported from file: 565.htm-->
+
<!-- imported from file: 758.htm-->

Revision as of 10:56, 7 March 2011



average

Gets double values for row values of the column and calculates the average value of those values.

Returns empty if there is no valid rows

Syntax

average(columnName)

Arguments

columnName: Is the name of a column in the data table.

Return type

number or empty

Examples

//get the average score of all students

number a = average(Score) where (true);

Availability

Version 4.8