Single item is coerced into a list
PRQL
from employees
select salary
SQL
SELECT
salary
FROM
employees
Same as above but with salary
in a list:
PRQL
from employees
select [salary]
SQL
SELECT
salary
FROM
employees
Multiple items
PRQL
from employees
derive [
gross_salary = salary + payroll_tax,
gross_cost = gross_salary + benefits_cost
]
SQL
SELECT
*,
salary + payroll_tax AS gross_salary,
salary + payroll_tax + benefits_cost AS gross_cost
FROM
employees
Same as above but split into two lines:
PRQL
from employees
derive gross_salary = salary + payroll_tax
derive gross_cost = gross_salary + benefits_cost
SQL
SELECT
*,
salary + payroll_tax AS gross_salary,
salary + payroll_tax + benefits_cost AS gross_cost
FROM
employees