Lists

Lists are represented with [], and can span multiple lines. A final trailing comma is optional.

PRQL

1. from numbers
2. derive [x = 1, y = 2]
3. derive [
4. a = x,
5. b = y
6. ]
7. derive [
8. c = a,
9. d = b,
10. ]

SQL

1. SELECT
2. *,
3. 1 AS x,
4. 2 AS y,
5. 1 AS a,
6. 2 AS b,
7. 1 AS c,
8. 2 AS d
9. FROM
10. numbers

Most transforms can take either a list or a single item, so these are equivalent:

PRQL

1. from employees
2. select [first_name]

SQL

1. SELECT
2. first_name
3. FROM
4. employees

PRQL

1. from employees
2. select first_name

SQL

1. SELECT
2. first_name
3. FROM
4. employees