Vex · Query DSL

Select and alias (fields)

from lists the tables of a query and fields lists each selected column as table.column. There is no SELECT *. A field written as { field, as } is returned under the alias given in as.

Query
{
  from: ['shows'],
  fields: ['shows.night', { field: 'shows.title', as: 'plays' }],
}
Table
CREATE TABLE shows (night text PRIMARY KEY, title text NOT NULL)
SQL
SELECT s1.night AS "night", s1.title AS "plays"
FROM shows AS s1
LIMIT 100
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.