Contenido del Curso
SQL Basics
SQL Basics
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
.
SELECT 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.
Tarea
From the audi_cars
table extract all the models available with Automatic transmission
.
¡Gracias por tus comentarios!
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
.
SELECT 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.
Tarea
From the audi_cars
table extract all the models available with Automatic transmission
.
¡Gracias por tus comentarios!
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
.
SELECT 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.
Tarea
From the audi_cars
table extract all the models available with Automatic transmission
.
¡Gracias por tus comentarios!
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
.
SELECT 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.
Tarea
From the audi_cars
table extract all the models available with Automatic transmission
.