Difference between revisions of "Average"

From Catglobe Wiki
Jump to: navigation, search
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:Math_Functions]]
+
{{HelpFiles}}

 
  
====average====
+
==== average ====
  
 
Gets double values for row values of the column and calculates the average value of those values.  
 
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
+
Returns empty if there is no valid rows  
  
'''Syntax'''
+
'''Syntax'''  
  
average(''columnName'')
+
average(''columnName'')  
  
'''Arguments'''
+
'''Arguments'''  
  
''columnName'': Is the name of a column in the data table.
+
''columnName'': Is the name of a column in the data table.  
  
'''Return type'''
+
'''Return type'''  
  
number or empty
+
number or empty  
  
'''Examples'''
+
'''Examples'''  
  
//get the average score of all students
+
//get the average score of all students  
  
number a = average(Score) where (true);
+
number a = average(Score) where (true);  
  
'''Availability'''
+
print(a);
  
Version 4.8
+
'''Availability'''
__NOTOC__
+
 
<!-- imported from file: 758.htm-->
+
Version 4.8 __NOTOC__ <!-- imported from file: 758.htm-->  
 +
 
 +
[[Category:Functions_Used_in_where_Expressions]]

Latest revision as of 11:33, 20 December 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);

print(a);

Availability

Version 4.8