Question: Use the UNION operator to generate a result set consisting of five columns from the Students table: Status A calculated column that contains a value
Use the UNION operator to generate a result set consisting of five columns from the Students table:
Status A calculated column that contains a value of UNDERGRAD or GRADUATED
FirstName
The FirstName column
LastName
The LastName colum?
EnrollmentDate
The EncollmentDate column
GraduationDate
The GraduationDate column
If the student doesn't have a value in the GraduationDate column, the Status column should contain a value of UNDERGRAD. Otherwise, it should contain a value of GRADUATED.
Sort the final result set by EnrollmentDate.
Write a SELECT statement that returns these two columns:
DepartmentName The DepartmentName column from the Departments table
CourselD.
The CourselD column from the Courses table
Return all departments with no courses. Hint: Use an outer join and only return rows where the CourselD column contains a null value.
Write a SELECT statement that returns these columns:
InstructorDept The DepartmentName column from the Departments table for an instructor
LastName The LastName column from the Instructors table
FirstName The FirstName column from the Instructors table
CourseDescription. The Coursedescription column from the Courses table
CourseDept The DepartmentiName column from the Departments table for a course
Return one row for each course that's in a different department than the department of the instructor assigned to teach that course. Hint: You will need to join the Departments table to both the Instructors table and the Courses table, which will require you to use table aliases to distinguish the two tables.
i Accessibility: Good to go
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
