Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Cis 111 Assignment #2 Chapter 4 Query Problems Query #1: List the company name, contact name, contact title and the phone number for customers who

Cis 111 Assignment #2 Chapter 4 Query Problems

Query #1: List the company name, contact name, contact title and the phone number for customers who HAVE NOT put in an order. Use an outer join.

Query #2: Create a listing displaying the employee first name, last name and the full name (First name space Last Name) of the person they report to (Supervisor). This is a self-join. If an employee does not report to anyone then they should not appear in the result set.

Query #3: This query will need 6 tables. Display the following: Customer ID, customer company name, employee last name who wrote the order, order date, order product name, order product quantity, and the company name of the supplier who provides the product. This should only contain orders that Buchanan (employee last name) created for customer id SAVEA. It should only be for orders written (OrderDate) for the month of July regardless of year use the Month(date field) function.

Query #4: List the product name and the supplier name distinctly for those products that meet the following criteria: there had to be at least a quantity of 100 placed on an order, the products should be within the following categories: Beverages, Meat/Poultry, Dairy Products, Seafood. Order the list by product name.

Query #5: Create a union that combines the following result sets: The first interim result set should display the literal Discounted, product ID, name, unit price, quantity, product sale amount which is a calculated field. (UnitPrice * Quantity) * (1 - Discount) AS ProductSale. This should be for discounted products (located in the OrderDetails table where discount>0) only where a quantity of 100 or more were placed for an order. The second interim result set should display the literal No Discount, product ID, name, unit price, quantity, product sale which should be setup as follows: (UnitPrice * Quantity) AS ProductSale. This should be for non discount products (discount=0) where a quantity of 100 or more were placed for an order.

Query #6: Create a query that will display an employee first name and last name uniquely for those employees that have sold at least one of the following products: Boston Crab Meat, Chai, and Sir Rodney's Scones. Make sure you bring in the correct number of tables to perform this query, a Cross Join SHOULD NOT BE USED.

Query #7: List the cities for an employee that is common to a customer city location. YOU MUST use the Intersect operator.

Query #8: This query will involve 7 tables. Make sure a CROSS JOIN is NOT used. Display the employee first name, last name, Territory description, unit price at the time of the order, quantity ordered, product name, region description for order quantities within the range of 10 and 25, territory of Atlanta, within the Southern region, unitprice of 10 dollars or less, and the product of Filo Mix.

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

More Books

Students also viewed these Databases questions

Question

What Is Technical Communication?

Answered: 1 week ago