Question: Write in sql Problem 1 1 A . What is the department name and a total credit earned by a student Boyle? Return ONLY the

Write in sql
Problem 1
1A. What is the department name and a total credit earned by a student Boyle? Return ONLY the department name and the total credit for that student.
1B. What OTHER students are in the SAME department that student Boyle is in? Display their names, IDs and total credit ordered by name in descending order. (use a sub-query)
1C. What grades has the student Boyle got in the years 2017 and 2018? List ONLY his course IDs and grades.
Problem 2
2A. Add two new students Frodo and Gandalf that just got accepted to the Marketing department. Assign IDs as 1111 and 1112, assign NULL to the number of credits.
2B. Student Gandalf started studying with 100 total credits (transferred from another university). Reflect that in the database.
2C. Student Frodo was expelled for being late too many times. Reflect that in the database. University policy for the expelled students is that their record is deleted.
Problem 3
3A. Find out how many courses are offered by each department that starts with the letter "C". Return ONLY the department name as well as the number of courses offered.
3B. What is the department(s) that offers the greatest number of courses among all the departments in the University? Return ONLY the name of this department and its number of courses offered.
Problem 4
A. Find the name, id and building of instructors whose department office is located in the building which name contains Lamb.
B. These instructors cannot be student's advisors any longer. Delete them from the table advisor using one single SQL statement (hint: use where referring to a sub-query similar to the previous one)
Problem 5
All instructors with salary lower than 40,000 are in fact new Ph.D. students in the same department, but that information is missing from the student table. Fix that problem by creating appropriate student records; use 0 credits as the total credit.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!