SUBJECT: PROGRAMMING IN SQL

SUBJECT: PROGRAMMING IN SQL

1. Create a view named vDepartmentInstructors that returns these columns:

Don't use plagiarized sources. Get Your Custom Essay on
SUBJECT: PROGRAMMING IN SQL
Just from $8 /Page 0r 300 words
Order Now
  1. the DepartmentName column from the Departments table
  2. the LastName, FirstName, Status, and AnnualSalary columns from the Instructors table.

2. Write a SELECT statement that returns all the columns from the vDepartmentInstructors view that you created in question 1.

Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper Now

Return one row for each fulltime instructor in the English department.

3. Write an UPDATE statement that updates the vDepartmentInstructors view you created in question 1 so it increases the annual salary for each fulltime instructor in the English department by 10%. Then, run the SELECT statement you wrote in question 2 to be sure this worked correctly.

4. Create a view named vStudentCoursesMin that returns these columns:

  1. the FirstName and LastName from the Students table
  2. the CourseNumber, CourseDescription, and CourseUnits from the Courses table.

5. Write a SELECT statement that returns these columns from the vStudentCoursesMin view that you created in question 4:

  1. LastName, FirstName, CourseDescription.

Return one row for each course with three units.

Sort the results by LastName and then by FirstName.

6. Create a view named vStudentCoursesSummary that uses the view you created in question 4.

  1. This view should return some summary information about each student.
  2. Each row should include these columns: LastName, FirstName, CourseCount (the number of courses the student is taking), and UnitsTotal (the total units for the student).

7. Write a SELECT statement that uses the view that you created in question 6 to

  1. get the total units for the five students with the most units.

Return the LastName, FirstName and total units for each of those students.

 

In: Computer Science

Looking for a similar assignment? Get help from our qualified experts!

Order Now