Assignment 2b: Nested Subqueries and SQL Updates
Assignment 2b: Nested Subqueries and SQL Updates
Find the id and title of all courses which do not require any prerequisites.
Find the names of students who have not taken any biology dept courses
Write SQL update queries to perform the following (queries 2 and 4 are pretty
meangless, but still fun to write):
1. Give a 10% hike to all instructors.
2. Increase the tot_creds of all students who have taken the course titled "Genetics" by
the number of credits associated with that course.
3. For all instructors who are advisors of atleast 2 students, increase their salary by 50000.
4. Set the credits to 2 for all courses which have less than 5 students taking them (across all
sections for the course, across all years/semesters).