1)
CREATE TABLE Notes (
id_note NUMBER PRIMARY KEY,
id_etudiant NUMBER,
id_matiere NUMBER,
note NUMBER,
date_note DATE
);
2)
INSERT INTO Notes (id_note, id_etudiant, id_matiere, note, date_note)
VALUES (1, 1, 1, 12, '01/02/2022');
INSERT INTO Notes (id_note, id_etudiant, id_matiere, note, date_note)
VALUES (2, 1, 2, 14, '01/02/2022');
INSERT INTO Notes (id_note, id_etudiant, id_matiere, note, date_note)
VALUES (3, 2, 1, 16, '02/02/2022');
INSERT INTO Notes (id_note, id_etudiant, id_matiere, note, date_note)
VALUES (4, 2, 2, 10, '02/02/2022');
INSERT INTO Notes (id_note, id_etudiant, id_matiere, note, date_note)
VALUES (5, 3, 1, 18, '03/02/2022');
INSERT INTO Notes (id_note, id_etudiant, id_matiere, note, date_note)
VALUES (6, 3, 2, 11, '03/02/2022');
3)
SELECT * FROM Notes
WHERE id_etudiant = 1;
4)
SELECT AVG(note) FROM Notes
WHERE id_etudiant = 2;
5)
SELECT COUNT(*) FROM Notes
WHERE id_matiere = 1;
6)
UPDATE Notes SET note = 15
WHERE id_etudiant = 1 AND id_matiere = 1;
7)
DELETE FROM Notes
WHERE id_matiere = 2;