Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create the Premiere Product Database and write queries to produce the following reports. Turn in SQL commands and related output for each query. These reports

Create the Premiere Product Database and write queries to produce the following reports. Turn in SQL commands and related output for each query. These reports refer to the Premier Products database.

1.Report the order number, order date for every order placed by the customer number 148.

2.List the sum of the balances of all customers for every sales rep. Order and group the results using the sales rep. Number.

3.Find the customer number, last name, and first name for every customer who did not place an order on Oct 23, 2003.

4.List the customer number, name, order number and order date for every order where the total value of the order exceeds $100.

5.Find out how many customers have a balance that is less than their credit limit.

6.Change the street address of sales rep number 65 in the REP table to null.

7.Increase the length of the PART_DESCRIPTION column to 30 characters.

8.Define a view named CUSTORD. It consists of the customer number, name, balance, order number, and order date for every order currently on file. (a) Write a view definition for CUSTORD.

(b) Write a query to retrieve the customer number, last name, first name, order number, and order date for every order in the CUSTORD view for each customer whose balance is more than $500.

(c ) Write the query that the DBMS actually executes.

9.Using SQL produce a query that lists the name, street address, city, state, and zip code for every customer. Concatenate the city, state, and zip code data into single expressions. Insert a comma between the city and state data, and trim the columns so that only one space is displayed between them. Order this data by zip code. Create a view named REPORT2 for the query that you just produced.

10.List Part_Number, Part_Description, total_Qty_on_Order for each part in the part table. Include parts that do not have any order.

11.List each Item_class and total qty ordered for each item class.

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

7. Identify six intercultural communication dialectics.

Answered: 1 week ago