Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Sorting Data | Sorting Retrieved Data
TEST SQL COURSE E2E

Swipe um das Menü anzuzeigen

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.

Aufgabe

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.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 1
Wir sind enttäuscht, dass etwas schief gelaufen ist. Was ist passiert?

Fragen Sie AI

expand
ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

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.

Aufgabe

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.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 1
Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
Wir sind enttäuscht, dass etwas schief gelaufen ist. Was ist passiert?
some-alt