Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
SQL Aliases | Filtering Statements
SQL Tutorial for Beginners
course content

Зміст курсу

SQL Tutorial for Beginners

SQL Tutorial for Beginners

1. Database & Introduction to Syntax
2. SQL Aggregate Functions
3. Filtering Statements

SQL Aliases

Ususally in database tables and columns can have long names. When you work with multiple tables, you should write the name of the column with the name of the table to define the column, for example, users.user_id and messages.date_created. To avoid overtyping, in SQL we use Aliases. They allow us to give temporary names to column or tables.

For example, for our table:

123
SELECT album, singer as some_label FROM songs as t WHERE t.album = 'The Dark Side of the Moon' OR t.singer = 'Mushmellow'
copy

Here you use table songs as t. In the console, instead of singer, your column has a label some_label. This example is not demonstrative enough, but in the next section we'll work with multiple tables, and temporary names may be useful.

Завдання

Find top-3 newest songs, their singers, and years, but use songs table as s. Make the column title displayed with the label name.

Завдання

Find top-3 newest songs, their singers, and years, but use songs table as s. Make the column title displayed with the label name.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 3. Розділ 10
toggle bottom row

SQL Aliases

Ususally in database tables and columns can have long names. When you work with multiple tables, you should write the name of the column with the name of the table to define the column, for example, users.user_id and messages.date_created. To avoid overtyping, in SQL we use Aliases. They allow us to give temporary names to column or tables.

For example, for our table:

123
SELECT album, singer as some_label FROM songs as t WHERE t.album = 'The Dark Side of the Moon' OR t.singer = 'Mushmellow'
copy

Here you use table songs as t. In the console, instead of singer, your column has a label some_label. This example is not demonstrative enough, but in the next section we'll work with multiple tables, and temporary names may be useful.

Завдання

Find top-3 newest songs, their singers, and years, but use songs table as s. Make the column title displayed with the label name.

Завдання

Find top-3 newest songs, their singers, and years, but use songs table as s. Make the column title displayed with the label name.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 3. Розділ 10
toggle bottom row

SQL Aliases

Ususally in database tables and columns can have long names. When you work with multiple tables, you should write the name of the column with the name of the table to define the column, for example, users.user_id and messages.date_created. To avoid overtyping, in SQL we use Aliases. They allow us to give temporary names to column or tables.

For example, for our table:

123
SELECT album, singer as some_label FROM songs as t WHERE t.album = 'The Dark Side of the Moon' OR t.singer = 'Mushmellow'
copy

Here you use table songs as t. In the console, instead of singer, your column has a label some_label. This example is not demonstrative enough, but in the next section we'll work with multiple tables, and temporary names may be useful.

Завдання

Find top-3 newest songs, their singers, and years, but use songs table as s. Make the column title displayed with the label name.

Завдання

Find top-3 newest songs, their singers, and years, but use songs table as s. Make the column title displayed with the label name.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Ususally in database tables and columns can have long names. When you work with multiple tables, you should write the name of the column with the name of the table to define the column, for example, users.user_id and messages.date_created. To avoid overtyping, in SQL we use Aliases. They allow us to give temporary names to column or tables.

For example, for our table:

123
SELECT album, singer as some_label FROM songs as t WHERE t.album = 'The Dark Side of the Moon' OR t.singer = 'Mushmellow'
copy

Here you use table songs as t. In the console, instead of singer, your column has a label some_label. This example is not demonstrative enough, but in the next section we'll work with multiple tables, and temporary names may be useful.

Завдання

Find top-3 newest songs, their singers, and years, but use songs table as s. Make the column title displayed with the label name.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 3. Розділ 10
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt