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

Зміст курсу

SQL Basics

SQL Basics

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

LIMITing results

As you might notice, our database is quite large - about three thousand cars. Sometimes we need to limit our results so only a few rows will be displayed. It may be useful if we work with big data and want to check if our query is valid or when we want to find TOP-n observation based on some condition.

To limit the number of rows to be shown use the LIMIT n statement. For example,

123
SELECT column1, column2 FROM table_name LIMIT 5
copy

this query will return the first 5 rows from table_name

Завдання

From the audi_cars table extract the first 10 rows of model, price, mileage columns.

Завдання

From the audi_cars table extract the first 10 rows of model, price, mileage columns.

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

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

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

LIMITing results

As you might notice, our database is quite large - about three thousand cars. Sometimes we need to limit our results so only a few rows will be displayed. It may be useful if we work with big data and want to check if our query is valid or when we want to find TOP-n observation based on some condition.

To limit the number of rows to be shown use the LIMIT n statement. For example,

123
SELECT column1, column2 FROM table_name LIMIT 5
copy

this query will return the first 5 rows from table_name

Завдання

From the audi_cars table extract the first 10 rows of model, price, mileage columns.

Завдання

From the audi_cars table extract the first 10 rows of model, price, mileage columns.

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

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

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

LIMITing results

As you might notice, our database is quite large - about three thousand cars. Sometimes we need to limit our results so only a few rows will be displayed. It may be useful if we work with big data and want to check if our query is valid or when we want to find TOP-n observation based on some condition.

To limit the number of rows to be shown use the LIMIT n statement. For example,

123
SELECT column1, column2 FROM table_name LIMIT 5
copy

this query will return the first 5 rows from table_name

Завдання

From the audi_cars table extract the first 10 rows of model, price, mileage columns.

Завдання

From the audi_cars table extract the first 10 rows of model, price, mileage columns.

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

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

As you might notice, our database is quite large - about three thousand cars. Sometimes we need to limit our results so only a few rows will be displayed. It may be useful if we work with big data and want to check if our query is valid or when we want to find TOP-n observation based on some condition.

To limit the number of rows to be shown use the LIMIT n statement. For example,

123
SELECT column1, column2 FROM table_name LIMIT 5
copy

this query will return the first 5 rows from table_name

Завдання

From the audi_cars table extract the first 10 rows of model, price, mileage columns.

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