AVGDIFF
Returns a number that represents the average difference between each of a child records of the parent.
AVGDIFF ( <field_name> [, <filter_query>] )
-
field_name: The numeric field to base the calculation on.
-
filter_query: A query string representing the domain of records to include.
Example: create field on the CUSTOMER table that returns, for each customer, the average difference in days between product purchases where the product code is B.
AVGDIFF( [PRODUCT.PRODUCT_PURCHASE_DATE] , [PRODUCT.PRODUCT_CODE] = "B")