Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Sorting Data | Sorting Retrieved Data
TEST SQL COURSE E2E

Свайпніть щоб показати меню

book
Sorting Data

Moreover, we can sort the receiving data. To do this, we first need to get the data by using the SELECT operator, then the ORDER BY clause. The ORDER BY clause accepts column names by which the output will be sorted accordingly. Let's look at an example for better understanding.

1234
SELECT continent FROM country ORDER BY continent;
copy

It is essential that the ORDER BY clauses come last in the SELECT operator.

Explanation: In the example, we can see that the ORDER BY clause sorts the data by the continent column.

Завдання

Swipe to start coding

Select the capital column from the country table. Next, sort the data from the capital column, retrieved using the SELECT statement.

Рішення

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

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 1
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

close

Awesome!

Completion rate improved to 16.67

book
Sorting Data

Moreover, we can sort the receiving data. To do this, we first need to get the data by using the SELECT operator, then the ORDER BY clause. The ORDER BY clause accepts column names by which the output will be sorted accordingly. Let's look at an example for better understanding.

1234
SELECT continent FROM country ORDER BY continent;
copy

It is essential that the ORDER BY clauses come last in the SELECT operator.

Explanation: In the example, we can see that the ORDER BY clause sorts the data by the continent column.

Завдання

Swipe to start coding

Select the capital column from the country table. Next, sort the data from the capital column, retrieved using the SELECT statement.

Рішення

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

Як ми можемо покращити це?

Дякуємо за ваш відгук!

close

Awesome!

Completion rate improved to 16.67

Свайпніть щоб показати меню

some-alt