Selecting data from specific columns

Select the data from the columns series_id, release_date, and title. At the same time, rename title to series_title and cast the type of release_date from Uint32 to Date.

Note

We assume that you already created tables in step Creating a table and populated them with data in step Adding data to a table.

  1. SELECT
  2. series_id, -- The names of columns (series_id, release_date, title)
  3. -- are separated by commas.
  4. title AS series_title, -- You can use AS to rename columns
  5. -- or give a name to an arbitrary expression
  6. CAST(release_date AS Date) AS release_date
  7. FROM series;
  8. COMMIT;

Selecting data from specific columns - 图1