HAVING some conditions
What if we want to filter grouped observations based on some condition? For example, we want to extract only those models available with Hybrid fuel types.
You can do it by grouping firstly by model, and then by fuel type filtered by condition on fueltype
.
1234SELECT model FROM audi_cars GROUP BY model, fueltype HAVING fueltype = 'Hybrid'
Please note, that you can use all the operators learned in the second section within
HAVING
statement.
Swipe to start coding
From the audi_cars
table extract all the models available with Automatic transmission
.
Solução
Obrigado pelo seu feedback!
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Awesome!
Completion rate improved to 2.63Awesome!
Completion rate improved to 2.63
HAVING some conditions
What if we want to filter grouped observations based on some condition? For example, we want to extract only those models available with Hybrid fuel types.
You can do it by grouping firstly by model, and then by fuel type filtered by condition on fueltype
.
1234SELECT model FROM audi_cars GROUP BY model, fueltype HAVING fueltype = 'Hybrid'
Please note, that you can use all the operators learned in the second section within
HAVING
statement.
Swipe to start coding
From the audi_cars
table extract all the models available with Automatic transmission
.
Solução
Obrigado pelo seu feedback!
single
Awesome!
Completion rate improved to 2.63
HAVING some conditions
Deslize para mostrar o menu
What if we want to filter grouped observations based on some condition? For example, we want to extract only those models available with Hybrid fuel types.
You can do it by grouping firstly by model, and then by fuel type filtered by condition on fueltype
.
1234SELECT model FROM audi_cars GROUP BY model, fueltype HAVING fueltype = 'Hybrid'
Please note, that you can use all the operators learned in the second section within
HAVING
statement.
Swipe to start coding
From the audi_cars
table extract all the models available with Automatic transmission
.
Solução
Obrigado pelo seu feedback!