Esercizio 9:11

Scarica in formato txt, pdf o txt
Scarica in formato txt, pdf o txt
Sei sulla pagina 1di 1

1.

SELECT avg(voto), count(voto), nome,cognome FROM studenti,voti WHERE


e_matricola=matricola
GROUP by matricola HAVING count(voto) >1 order by cognome,nome
2. SELECT DISTINCT(matricola),nome,cognome FROM studenti,voti WHERE
e_matricola=matricola and voto<5
3. SELECT cognome,nome from studenti order by datadinascita desc
4. SELECT cognome,nome, count(voto) from studenti,voti where matricola=e_matricola
GROUP by matricola HAVING count(voto)<6 order by cognome,nome
5. SELECT cognome ,nome, avg(voto) from studenti,voti where e_matricola= matricola
group by matricola having avg(voto)<6
6. SELECT matricola,nome,cognome,datadinascita,voto,docente,idmateria from
studenti,voti,materie where E_idmateria=idmateria and e_matricola= matricola
7. SELECT count(DISTINCT nome,cognome) from voti,studenti where
e_matricola=matricola and voto is not null

Potrebbero piacerti anche