Word filtering
Imagine that we want to extract all the hybrid cars from our database. As you understand, doing it manually is a worthless job and has to be automated.
Surely it has already been implemented! To filter observations based on columns with text use WHERE
statement. For example,
9
1
2
3
SELECT *
FROM audi_cars
WHERE fueltype = 'Hybrid'
123SELECT * FROM audi_cars WHERE fueltype = 'Hybrid'
This query will return all the Hybrid cars.
Please note, that in that case, you have to use single quotes, not double!
Tâche
Swipe to start coding
From audi_cars
table extract only cars with Automatic transmission
. Extract all the columns.
Solution
9
1
2
3
SELECT *
FROM audi_cars
WHERE transmission = 'Automatic'
Tout était clair ?
Merci pour vos commentaires !
Section 2. Chapitre 1
single
9
1
No query executed yet... |
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion