Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.69 KB | None | 0 0
  1. -- ----------
  2. -- QUERY 1.13
  3. -- ----------
  4. SELECT cognome , nome , classe
  5. FROM studenti
  6. WHERE (
  7. cognome LIKE 'R%'
  8. )
  9. ORDER BY cognome ASC;
  10.  
  11. -- ----------
  12. -- QUERY 1.14
  13. -- ----------
  14.  
  15. SELECT cognome, nome, descrizione
  16. FROM docenti
  17. JOIN materie on materie.idMateria = docenti.idDocente
  18. WHERE descrizione LIKE 'ita%' OR 'let%' OR 'sto';
  19.  
  20. -- ----------
  21. -- QUERY 1.15
  22. -- ----------
  23.  
  24. SELECT cognome , nome , classe, AVG(voto)
  25. FROM studenti
  26. JOIN prove on prove.idProva = studenti.idStudente
  27. GROUP BY voto
  28. HAVING voto between 3 AND 8
  29.  
  30. -- ----------
  31. -- QUERY 1.16
  32. -- ----------
  33.  
  34. SELECT cognome , nome , classe , AVG(voti)
  35. FROM studenti
  36. JOIN prove on prove.idProva = studenti.idStudente
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement