queries:functions:start

This is an overview of all functions available within the DQL. Functions can be used to aggregate (sum, average ..) or do custom tranformations (ceiling, flooring, …)

- avg
The avg function is an aggregation function and calculates the average of all values passed as a parameter and returns the result.

- chisquare
The chisquare function calculates the chisquare significance based on the submitted values. If the chisquare test is not appropriate, it will return null.

- coalesce
The coalesce function is used to transform a null value into something useful. If the parameter passed to coalesce is null, the second parameter will be returned and otherwise the first parameter.

- count
The count function is an aggregation function and returns the amount of rows fetched from the dataset.

- cumulate
The cumulate function does the same as the sum function, but is no aggregation function. This allows cumulative representations of data.

- distinctcount
The distinctcount function is very similar to the count function, but only counts distinct values - duplicates are ignored.

- if
The if function is used to apply a condition on a column. The first parameter is a condition, the second parameter is returned if the condition returns true and the third parameter is returned if the condition is false.

- max
The max function is an aggregation function which is capable of returning the maximum value from a column in a group.

- min
The min function is an aggregation function which allows to extract the lowest value from a group. The opposite function of this is the max function.

- participates
The participates function returns a flag, saying whether an experiment participates in an entity or not. For instance, this is useful to determine whether a session participates in an experiment.

- pres
The pres function can be used to read the result of the psum function for a single channel which comes from the experiment.

- psum
The psum function is an aggregation function and can be used on participation fields. It will sum the participations together and return a total sum mask for all channels.

- round
The round function rounds the values down to zero decimal places, or to the amount of decimal places submitted in the second parameter.

- stddev
The standard deviation function is an aggregation function which calculates the standard deviation of the submitted values.

- sum
The sum function is an aggregation function, it rolls all rows together and returns the total sum of the values submitted in the parameter.

- time
The time function returns the current time, in the same way as they are stored in all time columns. It returns the amount of seconds passed since 1970.

- timefloor
The

*timefloor*function rounds the time value to the closest interval value. This allows grouping based on time. - variation
The variation function is an aggregation function and calculates the variation of the submitted values.