Select

Picks and computes columns.

select [{assign_expression}]

Examples

PRQL

from employees
select first_name

SQL

SELECT
  first_name
FROM
  employees

PRQL

from employees
select [first_name, last_name]

SQL

SELECT
  first_name,
  last_name
FROM
  employees

PRQL

from employees
select name = f"{first_name} {last_name}"

SQL

SELECT
  CONCAT(first_name, ' ', last_name) AS name
FROM
  employees

PRQL

from employees
select [
  name = f"{first_name} {last_name}",
  age_eoy = dob - @2022-12-31,
]

SQL

SELECT
  CONCAT(first_name, ' ', last_name) AS name,
  dob - DATE '2022-12-31' AS age_eoy
FROM
  employees