-- Update the program_ID to 5 for student with ID = 101 UPDATE Student SET Program_ID = 5 WHERE ID = 101; -- Retrieve students older then 20 enrolled in program 102 SELECT ID, Name, Age, Program_ID FROM Student WHERE Age > 20 AND Program_ID = 102; -- Add a constraint for ratings to Ensur ratings in the Program table are between 0 and 5 Call the Constraint "Rating_check" ALTER TABLE Program ADD CONSTRAINT Rating_check CHECK(Rating <= 0 AND >= 5); -- Retrieve the total number of students(As Total_Students) Per Program ID. Sort it by number of students in ascending order SELECT Program_ID, COUNT(*) AS Total_Students FROM Student GROUP BY Program_ID ORDER BY Total_Students ASC; -- Select Unique Office Locations from the department table SELECT DISTINCT Office_Location FROM Department; -- Find the unqiue program levels and the total number of courses taught per program level SELECT Level, SUM(Number_Of_Courses) AS Total_Courses FROM Program GROUP BY Level;
To embed this project on your website, copy the following code and paste it into your website's HTML: