Computes one or more new columns.
derive {
name = expression,
# or
column,
}
from employees
derive gross_salary = salary + payroll_tax
SELECT
*,
salary + payroll_tax AS gross_salary
FROM
employees
from employees
derive {
gross_salary = salary + payroll_tax,
gross_cost = gross_salary + benefits_cost
}
SELECT
*,
salary + payroll_tax AS gross_salary,
salary + payroll_tax + benefits_cost AS gross_cost
FROM
employees