Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 5A-1.
SELECT DISTINCT LastName, FirstName
FROM Instructors i JOIN Courses c
ON i.InstructorID = c.InstructorID
ORDER BY LastName, FirstName ;
Write a SELECT statement (Commented as 5A-2) 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Power Bi And Azure Integrating Cloud Analytics For Scalable Solutions

Authors: Kiet Huynh

1st Edition

B0CMHKB85L, 979-8868959943

More Books

Students also viewed these Databases questions

Question

Given and find P(AB). If, further, are A and B independent?

Answered: 1 week ago

Question

Find y'. y= |x + X (x) (x) X 1 02x+ 2x 1 O 2x + 1/3 Ex 2x +

Answered: 1 week ago