Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Unique values from column | Selecting
SQL Basics
course content

Зміст курсу

SQL Basics

SQL Basics

1. Selecting
2. Filtering
3. Aggregating
4. Sorting
5. Grouping
6. Practicing

Unique values from column

In real life, you may work with big tables containing thousands of rows and lots of columns. For example, you may have a database with all the users who have visited your site, and you want to know all the countries that attended your site.

In SQL, to extract unique values from the column use the DISTINCT statement. For example, to extract unique countries from the table visitors use:

12
SELECT DISTINCT(country) FROM visitors
copy

Завдання

From the audi_cars table extract all the unique models of cars.

Завдання

From the audi_cars table extract all the unique models of cars.

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

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

Секція 1. Розділ 4
toggle bottom row

Unique values from column

In real life, you may work with big tables containing thousands of rows and lots of columns. For example, you may have a database with all the users who have visited your site, and you want to know all the countries that attended your site.

In SQL, to extract unique values from the column use the DISTINCT statement. For example, to extract unique countries from the table visitors use:

12
SELECT DISTINCT(country) FROM visitors
copy

Завдання

From the audi_cars table extract all the unique models of cars.

Завдання

From the audi_cars table extract all the unique models of cars.

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

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

Секція 1. Розділ 4
toggle bottom row

Unique values from column

In real life, you may work with big tables containing thousands of rows and lots of columns. For example, you may have a database with all the users who have visited your site, and you want to know all the countries that attended your site.

In SQL, to extract unique values from the column use the DISTINCT statement. For example, to extract unique countries from the table visitors use:

12
SELECT DISTINCT(country) FROM visitors
copy

Завдання

From the audi_cars table extract all the unique models of cars.

Завдання

From the audi_cars table extract all the unique models of cars.

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

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

In real life, you may work with big tables containing thousands of rows and lots of columns. For example, you may have a database with all the users who have visited your site, and you want to know all the countries that attended your site.

In SQL, to extract unique values from the column use the DISTINCT statement. For example, to extract unique countries from the table visitors use:

12
SELECT DISTINCT(country) FROM visitors
copy

Завдання

From the audi_cars table extract all the unique models of cars.

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