Question: Class, Do the following tasks in SSMS: Load the MurachCollegeDB ( unless already loaded ) . See the SQL Scripts Module. Select the MurachCollege DB
Class,
Do the following tasks in SSMS:
Load the MurachCollegeDB unless already loaded See the SQL Scripts Module.
Select the MurachCollege DB in the Object Explorer
Open the query text window via the New Query Tool.
New Query
Add Comments to your script to include your Name, class, and Assignment Name.
Create the following SQL queries using Select in the query window. Comment each step in the script. Each task must use a subquery.
Plant the code below in your script commented as A
SELECT DISTINCT LastName, FirstName
FROM Instructors i JOIN Courses c
ON iInstructorID cInstructorID
ORDER BY LastName, FirstName ;
Write a SELECT statement Commented as A that returns the same result set as this SELECT statement, but dont use a join. Instead, use a subquery in a WHERE clause that uses the IN keyword.
Write a SELECT statement that answers this question:
Which instructors have an annual salary thats greater than the average annual salary for all instructors?
Display the Last Name, First Name, and Annual Salary columns for each Instructor. Order in descending Annual Salary.
Write a SELECT statement that returns the LastName and FirstName columns from the Instructors table.
Return one row for each instructor that doesnt have any courses in the Courses table. To do that, use a subquery introduced with the NOT EXISTS operator.
Sort the result set by LastName and then by FirstName.
Run your created script.
Save the displayed results partial data OK in a Screen shot.
Save the SqlQuery using SSMS into as a sql file.
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
