Professional Documents
Culture Documents
Consultas Parcial 1
Consultas Parcial 1
select * from estudiante where sexest = 'M' and Edad > 18;
Select codest, nomest, edad, sexest, fecnac, ciuest, nomfac, nomcar from
estudiantes, carreras, facultades where facultades.codfac = carreras.codfac and
carreras.codcar = estudiantes.codcar and nomest ='Diana';
Select nomest, edad from estudiante where nomest ='Juan' union Select nomest, edad
from estudiante where nomest ='Lucia';
Select nomest, ciuest, sexest from estudiante where nomest like 'A%' and ciuest =
'Cali' and sexest = 'F';
Select nomest, ciuest, sexest from estudiante where nomest like 'C%' and ciuest =
'Bucaramanga' and sexest = 'M';
Select nomest, edad, fecnac from estudiante where fecnac BETWEEN '1/1/1998' and
'31/12/1998';
Select codest, nomest from estudiante where codest = 10 union Select codest, nomest
from estudiante where codest = 40 union Select codest, nomest from estudiante where
codest = 80;
Select nomest, edad, ciuest from estudiante where ciuest = 'Medellin' and sexest =
'F';
Select nomcarr, vlrcarr from carrera where vlrcarr = (Select min(vlrcarr) from
carrera) union Select nomcarr, vlrcarr from carrera where vlrcarr = (Select
max(vlrcarr) from carrera);