Difference between revisions of "Average"

From Catglobe Wiki
Jump to: navigation, search
 
Line 1: Line 1:
[[Category:Functions_Used_in_where_Expressions]]
+
{{HelpFiles}}  
{{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'''
 +
 
 +
average(''columnName'')
  
'''Syntax'''
+
'''Arguments'''  
  
average(''columnName'')
+
''columnName'': Is the name of a column in the data table.
  
'''Arguments'''
+
'''Return type'''  
  
''columnName'': Is the name of a column in the data table.
+
number or empty
  
'''Return type'''
+
'''Examples'''  
  
number or empty
+
//get the average score of all students
  
'''Examples'''
+
number a = average(Score) where (true);
  
//get the average score of all students
+
print(a);
  
number a = average(Score) where (true);
+
'''Availability'''
  
'''Availability'''
+
Version 4.8 __NOTOC__ <!-- imported from file: 758.htm-->
  
Version 4.8
+
[[Category:Functions_Used_in_where_Expressions]]
__NOTOC__
 
<!-- imported from file: 758.htm-->
 

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