WSO2 Complex Event Processor is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Syntax<double> math:percentile (<int|long|float|double>  arg,  <double> p)
Extension TypeFunction
DescriptionReturns the pth percentile value of the arg values. 

from inputStream#window.length(100)

select math:percentile(temperature, 97.0) as percentile

insert into outputStream;

returns 97th percentile value of last 100 temperature values.