Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Retrieving Distinct Rows | Retrieving Data
TEST SQL COURSE E2E
course content

Contenu du cours

TEST SQL COURSE E2E

TEST SQL COURSE E2E

1. Sorting Retrieved Data
2. Retrieving Data
3. Failing init script
4. Long execution init script

book
Retrieving Distinct Rows

Note that the SELECT statement returns all rows in a given column. Nevertheless, what if we don't need all the values ​​from a column (because they can be duplicated), and we only need unique values? For such cases, it is convenient to use the keyword DISTINCT. Moreover, this keyword is used immediately before the column names. Let's look at an example.

1
SELECT DISTINCT region FROM country;
copy
Tâche

Swipe to start coding

You have to retrieve distinct (unique) continent values.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 3
toggle bottom row

book
Retrieving Distinct Rows

Note that the SELECT statement returns all rows in a given column. Nevertheless, what if we don't need all the values ​​from a column (because they can be duplicated), and we only need unique values? For such cases, it is convenient to use the keyword DISTINCT. Moreover, this keyword is used immediately before the column names. Let's look at an example.

1
SELECT DISTINCT region FROM country;
copy
Tâche

Swipe to start coding

You have to retrieve distinct (unique) continent values.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 3
Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
We're sorry to hear that something went wrong. What happened?
some-alt