Mathematical functions

These are all the functions defined in the math module:

functionparametersdescription
abscolAbsolute value of col
acoscolArccosine of col
asincolArcsine of col
atancolArctangent of col
ceilcolRounds the number up of col
coscolCosine of col
degreescolConverts radians to degrees
expcolExponential of col
floorcolRounds the number down
lncolNatural logarithm of col
logb colb-log of col
log10col10-log of col
piThe constant π
powb colComputes col to the power b
radianscolConverts degrees to radians
roundn colRounds col to n decimal places
sincolSin of col
sqrtcolSquare root of col
tancolTangent of col

Example

PRQL

from employees
select age_squared = (age | math.pow 2)

SQL

SELECT
  POW(age, 2) AS age_squared
FROM
  employees