Created
September 11, 2024 18:45
-
-
Save diegoolipa/d1e7ba893def884960d89c20a8981202 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--EJERCICIO 16 | |
--Uso de la CLAUSULA HAVING | |
SELECT apellido_paterno, count(*) AS cantidad FROM PERSONA | |
GROUP BY apellido_paterno | |
HAVING count(*) >= 2 | |
; | |
--Ejercicio 17 JOINS | |
--Uso de INNER JOIN | |
SELECT * FROM PERSONA p | |
inner join genero g on p.id_genero = g.id_genero; | |
--Ejercicio 18 JOINS | |
--Uso de LEFT JOIN | |
SELECT * FROM genero g | |
left join persona p on p.id_genero = g.id_genero; | |
--Ejercicio 19 JOINS | |
--Uso de RIGHT JOIN | |
SELECT * FROM persona P | |
right join estado_civil ec on p.id_estado_civil= ec.id_estado_civil; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment