) Engine =InnoDB;
) Engine =InnoDB;
/*a*/
ING. EMPERATRIZ TAPIA MARURI
UNIVERSIDAD NACIONAL DE SAN ANTONIO ABAD DEL CUSCO
INSTITUTO DE SISTEMAS CUSCO
select *
from talumno
order by nombre asc;
/*b*/
select max(tmatricula.nota1) as NotaMayor
from tcurso INNER JOIN tmatricula
ON tmatricula.codcurso=tcurso.codcurso
where tcurso.nombre='algoritmica';
/*c*/
select nombre,min(horatotal)
from tcurso
order by nombre asc;
/*d*/
select *
from talumno
where apellidos like'%huaman%';
/*e*/
SELECT tdocente.nombre
from (tdocente INNER JOIN tmatricula ON tdocente.coddocente=tmatricula.coddocente)
INNER JOIN talumno ON tmatricula.codalumno=talumno.codalumno
WHERE tdocente.especialidad='algoritmica';
/*f*/
select nombre
from talumno
where e ;
/*g*/
select *
from tdocente
where j;
/*h*/
select talumno.nombre
from (tdocente INNER JOIN tmatricula ON tdocente.coddocente=tmatricula.coddocente)
INNER JOIN talumno ON tmatricula.codalumno=talumno.codalumno
where tdocente.especialidad='matematica';
/*i*/
select count(*) as AproyDesaproHerrami
from (tdocente INNER JOIN tmatricula ON tdocente.coddocente=tmatricula.coddocente)
INNER JOIN talumno ON tmatricula.codalumno=talumno.codalumno
where tdocente.especialidad='herramientas' and (nota1+nota2+nota3)/3>10
or tdocente.especialidad='herramientas' and (nota1+nota2+nota3)/3<=10;
/*Jfaltaaaaaa*/
select tcurso.nombre
ING. EMPERATRIZ TAPIA MARURI
UNIVERSIDAD NACIONAL DE SAN ANTONIO ABAD DEL CUSCO
INSTITUTO DE SISTEMAS CUSCO
from (tdocente INNER JOIN tmatricula ON tdocente.coddocente=tmatricula.coddocente)
INNER JOIN talumno ON tmatricula.codalumno=talumno.codalumno
where count(tcurso.codcurso=tmatricula.codcurso)
group by tcurso.nombre;
/*k*/
select talumno.nombre,apellidos as Ganador,max((tmatricula.nota1+nota2+nota3)/3)
from (tdocente INNER JOIN tmatricula ON tdocente.coddocente=tmatricula.coddocente)
INNER JOIN talumno ON tmatricula.codalumno=talumno.codalumno
where tdocente.especialidad='contabilidad' and (nota1+nota2+nota3)/3>10;
/*l*/
select talumno.nombre,((tmatricula.nota1+nota2+nota3)/3)
from (tdocente INNER JOIN tmatricula ON tdocente.coddocente=tmatricula.coddocente)
INNER JOIN talumno ON tmatricula.codalumno=talumno.codalumno
group by talumno.nombre;
/*m*/
select talumno.nombre,apellidos,tcurso.nombre
from (talumno INNER JOIN tmatricula ON talumno.codalumno=tmatricula.codalumno)
INNER JOIN tdocente ON tmatricula.coddocente=tdocente.coddocente
group by talumno.nombre;