lunedì 19 gennaio 2009

COMPITO DI INFORMATICA
Es1
select studente.nome, materia.nome, voto.voto from studente, materia, votowhere studente.idStudente=voto.idStudente and materia.idMateria=voto.idMateriaorder by studente.nome asc;
Es2
select studente.nome,materia.nome,modulo.nome, voto.voto from studente,materia ,modulo, voto
wherestudente.idStudente=voto.idStudente and materia.idMateria =voto.idMateria and
materia.idMateria=modulo.idMateria andstudente.nome='Paperino';
Es3
select idMateria, studente.nome, voto.voto from studente, materia, votowhere studente.idStudente=voto.idStudente and materia.idMateria=voto.idMateriaand studente.nome='Paperino' and voto.idStudente<6 group by voto.idMateria;
Es4
select idMateria, voto from voto where idMateria=1 group by idMateria;
Es 5
Select count(voto) from voto where idMatreia=1 group by idMateria;
Es 6
select studente .nome, count(voto) as 'numero voti' from voto, studente where
studente.idStudente=voto.idStudente and voto.idStudente<6 group by voto.idStudente;
Es7
select studente.nome, avg(voto) as 'media voti' from voto, studente where
studente.idStudente=voto.idStudente group by voto.idStudente;
Es8
select
docente,materia.noime,modulo.nome,programmazione.mmaaInizio,programmazione.mmaaFine
from docente, materia, modulo, programmazione where materia.idMateria=modulo.idMateria and
docente.idDocente=programmazione.idMateria and modulo.idModulo=programmazione.idModulo;