docente(nome,dipartimento) studente(nome,eta,corsoLaurea) tesi(studente,docente,titolo) - calcolare l'etą media degli studenti che svolgono una tesi con docenti afferenti al dipartimento di elettronica SELECT avg(eta) FROM docente d, studente s, tesi t WHERE s.nome=t.studente and t.docente=d.nome and d.dipartimento= 'elettronica' - calcolare i docenti che hanno almeno due tesisti afferenti allo stesso corso di laurea SELECT t.docente FROM tesi t1, tesi t2, studente s1, studente s2 WHERE t1.docente=t2.docente and t1.studente<>t2.studente and t1.studente=s1.nome and t2.studente=s2.nome and s1.corsoLaurea=s2.corsolaurea - calcolare i docenti che hanno solo tesisti iscritti al corso di laurea di informatica SELECT t.docente FROM tesi t WHERE NOT EXISTS (SELECT * FROM studente s WHERE s.nome=t.studente and s.corsoLaurea='informatica' ) - Per ogni corso di laurea con pił di 20 studenti, calcolare il numero di tesi svolte da studenti con pił di 25 anni. CREATE VIEW vista AS SELECT corsoLaurea FROM studente GROUP BY corsoLaurea HAVING count(*)>20; SELECT count(*) FROM tesi t, studente s, vista v WHERE t.studente=s.nome and s.eta>25 and s.corsoLaurea=v.corsoLaurea GROUP BY corsoLaurea