From

Specifies a data source.

PRQL

from artists

SQL

SELECT
  *
FROM
  artists

To introduce an alias, use an assign expression:

PRQL

from e = employees
select e.first_name

SQL

SELECT
  first_name
FROM
  employees AS e

Table names containing spaces or special characters need to be contained within backticks:

PRQL

from `artist tracks`

SQL

SELECT
  *
FROM
  "artist tracks"

default_db.tablename can be used if the table name matches a function from the standard library.

Note

We realize this is an awkward workaround. Track & 👍 #3271 for resolving this.

PRQL

default_db.group  # in place of `from group`
take 1

SQL

SELECT
  *
FROM
  "group"
LIMIT
  1