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

Зміст курсу

SQL Basics

SQL Basics

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

bookFiltering by numeric interval

But what if we have a bounded budget and need to choose cars in a specific price range? Simply, we can set two conditions: price > minimum value AND price < maximum value.

Yes, that will work. But SQL provides us with a simple solution to this problem - using BETWEEN statement. The condition above can be rewritten in SQL query as BETWEEN minimum value AND maximum value. For example, we can choose cars with mileage from 1000 to 5000 miles.

123
SELECT * FROM audi_cars WHERE mileage BETWEEN 1000 AND 5000
copy

Please note, that both limits are included (i.e. it's equvivalent to 1000 <= mileage <= 5000).

Завдання
test

Swipe to show code editor

From the audi_cars table extract all the cars with prices (column price) in the range [12 000; 15 000].

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

Як ми можемо покращити це?

Дякуємо за ваш відгук!

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

bookFiltering by numeric interval

But what if we have a bounded budget and need to choose cars in a specific price range? Simply, we can set two conditions: price > minimum value AND price < maximum value.

Yes, that will work. But SQL provides us with a simple solution to this problem - using BETWEEN statement. The condition above can be rewritten in SQL query as BETWEEN minimum value AND maximum value. For example, we can choose cars with mileage from 1000 to 5000 miles.

123
SELECT * FROM audi_cars WHERE mileage BETWEEN 1000 AND 5000
copy

Please note, that both limits are included (i.e. it's equvivalent to 1000 <= mileage <= 5000).

Завдання
test

Swipe to show code editor

From the audi_cars table extract all the cars with prices (column price) in the range [12 000; 15 000].

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

Як ми можемо покращити це?

Дякуємо за ваш відгук!

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

bookFiltering by numeric interval

But what if we have a bounded budget and need to choose cars in a specific price range? Simply, we can set two conditions: price > minimum value AND price < maximum value.

Yes, that will work. But SQL provides us with a simple solution to this problem - using BETWEEN statement. The condition above can be rewritten in SQL query as BETWEEN minimum value AND maximum value. For example, we can choose cars with mileage from 1000 to 5000 miles.

123
SELECT * FROM audi_cars WHERE mileage BETWEEN 1000 AND 5000
copy

Please note, that both limits are included (i.e. it's equvivalent to 1000 <= mileage <= 5000).

Завдання
test

Swipe to show code editor

From the audi_cars table extract all the cars with prices (column price) in the range [12 000; 15 000].

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

Як ми можемо покращити це?

Дякуємо за ваш відгук!

But what if we have a bounded budget and need to choose cars in a specific price range? Simply, we can set two conditions: price > minimum value AND price < maximum value.

Yes, that will work. But SQL provides us with a simple solution to this problem - using BETWEEN statement. The condition above can be rewritten in SQL query as BETWEEN minimum value AND maximum value. For example, we can choose cars with mileage from 1000 to 5000 miles.

123
SELECT * FROM audi_cars WHERE mileage BETWEEN 1000 AND 5000
copy

Please note, that both limits are included (i.e. it's equvivalent to 1000 <= mileage <= 5000).

Завдання
test

Swipe to show code editor

From the audi_cars table extract all the cars with prices (column price) in the range [12 000; 15 000].

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