DROP TABLE STUDENT;

CREATE TABLE STUDENT
(
Nr_Matricol int,
Nume varchar(30),
Grupa varchar(5),
Medie number
);

INSERT INTO STUDENT VALUES (6, 'GI Joe', '331CA', 1.1);
INSERT INTO STUDENT VALUES (1, 'Tapus Radu', '331CA', 11.1);
INSERT INTO STUDENT VALUES (2, 'Fotea Ioana', '331CA', 9.5);
INSERT INTO STUDENT VALUES (3, 'Popescu Ion', '331CB', 5.7);
INSERT INTO STUDENT VALUES (4, 'Badea Gheorghe', '331CB', 5.2);
INSERT INTO STUDENT VALUES (5, 'Marcu Vasile', '331CB', 6.1);

SELECT * FROM STUDENT;

SELECT * FROM STUDENT
ORDER BY Medie DESC;

SELECT *
FROM STUDENT
WHERE Nr_Matricol
BETWEEN 2 AND 4;

UPDATE STUDENT SET Medie=10 WHERE Grupa='331CA';

SELECT * FROM STUDENT;

DELETE FROM STUDENT WHERE Grupa='331CB';

SELECT * FROM STUDENT;
