Filtering 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.
123SELECT * FROM audi_cars WHERE mileage BETWEEN 1000 AND 5000
Please note, that both limits are included (i.e. it's equvivalent to
1000 <= mileage <= 5000
).
Swipe to start coding
From the audi_cars
table extract all the cars with prices (column price
) in the range [12 000; 15 000].
Oplossing
Bedankt voor je feedback!
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Awesome!
Completion rate improved to 2.63Awesome!
Completion rate improved to 2.63
Filtering 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.
123SELECT * FROM audi_cars WHERE mileage BETWEEN 1000 AND 5000
Please note, that both limits are included (i.e. it's equvivalent to
1000 <= mileage <= 5000
).
Swipe to start coding
From the audi_cars
table extract all the cars with prices (column price
) in the range [12 000; 15 000].
Oplossing
Bedankt voor je feedback!
single
Awesome!
Completion rate improved to 2.63
Filtering by numeric interval
Veeg om het menu te tonen
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.
123SELECT * FROM audi_cars WHERE mileage BETWEEN 1000 AND 5000
Please note, that both limits are included (i.e. it's equvivalent to
1000 <= mileage <= 5000
).
Swipe to start coding
From the audi_cars
table extract all the cars with prices (column price
) in the range [12 000; 15 000].
Oplossing
Bedankt voor je feedback!