Question
Using the VLABS environment, log into SQL SERVER and use the tables IST210-ONLINE schema with the prefix of MSC, and perform the following queries: 1.
Using the VLABS environment, log into SQL SERVER and use the tables IST210-ONLINE schema with the prefix of MSC, and perform the following queries:
1. Display employee number, lastname, first name and the job description for all the employees. The order of columns for the display must be the same as it is provided in the previous sentence. You will join MSC_employee and MSC_job tables.
2. Write and execute a SELECT statement that will return the customers name, street, state, zip code,salesmans number assigned to customer, and the assigned salesmans last name for customers located in the state of Tennessee.
3. Display data from the MSC_Product_detail table by performing a Three Table Join with the MSC_Product_detail, MSC_Product_master and MSC_Vendor tables. The SELECT statement will display product number, product description, commission percent, vendor name and quantity in stock... and only for product details that have quantity in stock less than 200. In addition, the result needs to be sorted by descending value of quantity in stock.
4. Write a select statement that will display customer number, customer name and the number of orders belong to the customer whose state is South Carolina. You will need to join two tables, use a COUNT aggregate and a GROUP BY clause in your SELECT statement. Override labels with a more descriptive but brief label.
5. Create and execute a SELECT statement that would provide data for a vendor directory. Display should include vendor number, vendor name, street, city, state, zip code. Concatenate the address elements to look like 1234 Main Street State College, PA 16802. Override the column labels with meaningful descriptions. Directory display should be sorted by zip code of vendor.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started