STAT_5TH_PERCENTILE

This function returns the same value for every record in a table. It allows the resultant summary statistic for a field to be compared against each individual value for the field. In this case the summary statistic returned is the 5th percentile value.

STAT_5TH_PERCENTILE ( <field_name>[, <from_value>[, <to_value> [, <sample_size>[, <filter_query>]]]] )
  • field_name - the name of the field to calculate the statistic on.
  • from_value - the lowest value for the field to include in the calculation of the statistic. The default is the minimum value in the field.
  • to_value - the highest value for the field to include in the calculation of the statistic. The default is the maximum value in the field.
  • sample_size - a number representing the number of records to include. Can be 1, 10, 100 or 1000. The default is 1.
  • filter_query - a query string representing the domain of records to calculate the statistic for.

Example: create a query at the CUSTOMER level to return customers whose income is more than the 5th percentile value of income for male customers, taking into account all income values between 5000 and 40000 in the calculation of the statistic. Note that the sample size parameter has been left blank.

CUSTOMER.INCOME > STAT_5TH_PERCENTILE ( [CUSTOMER.INCOME],5000,40000,,[CUSTOMER.GENDER]="Male" )