Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Sorting by one column | Sorting
SQL Basics
course content

Conteúdo do Curso

SQL Basics

SQL Basics

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

Sorting by one column

Welcome to the fourth section! Now it's time to learn how to sort the table based on some criteria.

For example, we want to sort the entire audi_cars table based on the mileage column. In SQL to sort by column use ORDER BY col_name statement preceded by WHERE, FROM, and SELECT statements.

123
SELECT * FROM audi_cars ORDER BY mileage
copy

Please note, that sorting in SQL is realized in ascending order by default.

Tarefa

From the audi_cars table extract all the cars sorted by price.

Tarefa

From the audi_cars table extract all the cars sorted by price.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 4. Capítulo 1
toggle bottom row

Sorting by one column

Welcome to the fourth section! Now it's time to learn how to sort the table based on some criteria.

For example, we want to sort the entire audi_cars table based on the mileage column. In SQL to sort by column use ORDER BY col_name statement preceded by WHERE, FROM, and SELECT statements.

123
SELECT * FROM audi_cars ORDER BY mileage
copy

Please note, that sorting in SQL is realized in ascending order by default.

Tarefa

From the audi_cars table extract all the cars sorted by price.

Tarefa

From the audi_cars table extract all the cars sorted by price.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 4. Capítulo 1
toggle bottom row

Sorting by one column

Welcome to the fourth section! Now it's time to learn how to sort the table based on some criteria.

For example, we want to sort the entire audi_cars table based on the mileage column. In SQL to sort by column use ORDER BY col_name statement preceded by WHERE, FROM, and SELECT statements.

123
SELECT * FROM audi_cars ORDER BY mileage
copy

Please note, that sorting in SQL is realized in ascending order by default.

Tarefa

From the audi_cars table extract all the cars sorted by price.

Tarefa

From the audi_cars table extract all the cars sorted by price.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Welcome to the fourth section! Now it's time to learn how to sort the table based on some criteria.

For example, we want to sort the entire audi_cars table based on the mileage column. In SQL to sort by column use ORDER BY col_name statement preceded by WHERE, FROM, and SELECT statements.

123
SELECT * FROM audi_cars ORDER BY mileage
copy

Please note, that sorting in SQL is realized in ascending order by default.

Tarefa

From the audi_cars table extract all the cars sorted by price.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 4. Capítulo 1
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt