Advertisement
Demetra4

BD

May 25th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.74 KB | None | 0 0
  1. SELECT cod_materie, COUNT(Fisa_note.Nota)  * 100.0 / (SELECT COUNT(Persoana.cod_student)
  2.                                                           FROM Persoana) AS Procentaj_studenti_picati
  3. FROM Fisa_note
  4. WHERE EXISTS (SELECT cod_materie
  5.                   FROM Discipline
  6.                     WHERE Fisa_note.Cod_materie = Discipline.Cod_materie AND Fisa_note.Nota < 5
  7.                  )    GROUP BY cod_materie
  8.  
  9.  
  10. *****************************************************
  11.  
  12. SELECT data_notare ,denumire,  COUNT(FIsa_note.cod_student) AS studenti_promovati , credite
  13. FROM fIsa_note, discipline
  14. WHERE Nota > 5 AND Fisa_note.cod_materie = Discipline.cod_materie
  15. GROUP BY data_notare , denumire,  credite
  16. ORDER BY credite DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement