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

Зміст курсу

SQL Basics

SQL Basics

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

Number filtering

But what if we want to choose a car with small mileage, let it be less than 5000 miles. We need to set the condition to a numeric column.

This also can be done with WHERE statement. For example,

123
SELECT * FROM audi_cars WHERE mileage < 5000
copy

Comparison operators you also can use for numeric columns:

  • < - less than
  • <= - less-equal
  • >= - greater-equal -> - greater
  • = - equal
  • <> - not equal.

Now let's try to find the cheapest car in this dataset.

Завдання

From the audi_cars dataset extract cars with price less than 10 000.

Завдання

From the audi_cars dataset extract cars with price less than 10 000.

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

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

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

Number filtering

But what if we want to choose a car with small mileage, let it be less than 5000 miles. We need to set the condition to a numeric column.

This also can be done with WHERE statement. For example,

123
SELECT * FROM audi_cars WHERE mileage < 5000
copy

Comparison operators you also can use for numeric columns:

  • < - less than
  • <= - less-equal
  • >= - greater-equal -> - greater
  • = - equal
  • <> - not equal.

Now let's try to find the cheapest car in this dataset.

Завдання

From the audi_cars dataset extract cars with price less than 10 000.

Завдання

From the audi_cars dataset extract cars with price less than 10 000.

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

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

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

Number filtering

But what if we want to choose a car with small mileage, let it be less than 5000 miles. We need to set the condition to a numeric column.

This also can be done with WHERE statement. For example,

123
SELECT * FROM audi_cars WHERE mileage < 5000
copy

Comparison operators you also can use for numeric columns:

  • < - less than
  • <= - less-equal
  • >= - greater-equal -> - greater
  • = - equal
  • <> - not equal.

Now let's try to find the cheapest car in this dataset.

Завдання

From the audi_cars dataset extract cars with price less than 10 000.

Завдання

From the audi_cars dataset extract cars with price less than 10 000.

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

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

But what if we want to choose a car with small mileage, let it be less than 5000 miles. We need to set the condition to a numeric column.

This also can be done with WHERE statement. For example,

123
SELECT * FROM audi_cars WHERE mileage < 5000
copy

Comparison operators you also can use for numeric columns:

  • < - less than
  • <= - less-equal
  • >= - greater-equal -> - greater
  • = - equal
  • <> - not equal.

Now let's try to find the cheapest car in this dataset.

Завдання

From the audi_cars dataset extract cars with price less than 10 000.

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