Question: CS 4 4 3 - A 2 No duplicate rows are allowed Write the queries necessary to obtain the required information. Make sure all columns
CS A
No duplicate rows are allowed
Write the queries necessary to obtain the required information. Make sure all columns you return have descriptive column headings. You must show the result of the query. For example, if the query is:
Rightarrow Show the office id the city, and the region
Rightarrow Your query should be:
select office, city, region
from offices;
Rightarrow and then you need to show the following on the screen: snapshot of your result
The following are the questions for A
Write a select statement to list all the columns from the Offices table. 'Select is not allowed. Return the list in DESC Office order.
List the product id mfr id Name its description and dollar value of quantity on hand price quantity of the products that their dollar value is greater than Return the list in descending order by their dollar value.
List the Order Number, Order Date, Customer Number and Sales Rep Number for orders for part mathrmCprime or CUse a compound search condition OR
List the Name and Age for all Sales Reps in the following offices: ; Use the set membership test IN
List the names of all Sales Reps who have the letter athis is lower case a as the second character of their name.
Return the Sales Rep ID and Name of any Sales Rep not assigned to an office yet.
Show all the sales rep names with last name "Smith" or "Jones".
List different titles in the sales reps table. Only list each title once and unknown titles should be ignored.
Duplicate rows are not allowed.
List the Mfr Id the Product Id Company and PRICE of all products bought by customers where customer
number is one of and where the amount of the order $ Order the results by
ascending Company. Duplicate row are not allowed.
List all orders number, the name of the rep who took the order, the city where the rep has hisher office. Print
the employee whose office is in either Chicago or Denver;
List all customers Customer number, Company, and Credit Limit and orders Order Number,
Amount where the Amount is within $ of the Credit Limit. Therefore:
Creditlimit should be greater than zero and
Amount should be greater than zero and
Amount should be less than creditlimit and
Creditlimit Amount $
List all salesreps names and their managers' names where the salesrep is at least as old as the
manager. Duplicate rows are not allowed.
List all salesreps Name and the City they work in where either the sales of the salesrep Quota or
the sales for the office is Target.
List the name, id and hire date of the salesreps where the following two conditions hold:
a The salesrep sales should be greater than the quota and
b The rep should be either "Sam Clark", or "Mary Jones"
List all orders Order Number over $ showing the company placing the order, the Customer
Rep assign to the company, the Office id and the city, and the rep who took the order where such
that the Customer Rep's is not the rep who took the order.
List all customer reps their name and their id and their managers name in which the manager is
based in New York. Use appropriate column header.
List all products Productld MFRId and Description customers CustNum Company who have
bought that product, and orders Order Number, and Order Date where the order $ Sort the
rows by the OrderDate. Duplicate rows is not allowed.
List the name of the salesreps and the name of their managers only if the manager has taken care of
some orders.
The screen shots provided show everything in more detail
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
