Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

Purpose:

This laboratory provides practice in the creation and use of basic and advanced SQL queries involving more than one table in a DB schema.

Procedure:

Using your assigned user name, password, and host string, log in to Oracle SQL*Plus, and open a spool file to collect your dialog. Create queries to answer the following questions. Your queries should be written so that they use only the data provided and display only the data requested.

Don't edit the initial spool file. You will make mistakes and will not be penalized for them. Attach it to the back of your report. Follow the instructor's instruction concerning any additional required items, any needed sign-offs, and the due date of this report.

Part A:

1. Display the invoice number, the invoice date, the customer id, and the customer name for each order in the database.

2. Display the invoice number, the customer id, and the customer name for each order placed on September 12th, 2007.

3. Display the invoice number, the invoice date, the product id, the number of units ordered, and the line price for each line in each order.

4. Display the id and the name of each customer that placed an order on September 12th, 2007, using the IN operator in your query.

5. Display the id and the name of each customer that placed an order on September 12th, 2007, using the EXISTS operator in your query.

6. Display the id and the name of each customer that did not place an order on September 12th, 2007. (Be careful in performing this query.)

7. Display the invoice number, the invoice date, the product id, the product description, and the product type for each line in each order.

8. Display the same data as in question 7, but order the display by product type. Within each type, order the display by invoice number.

9. Display the sales representative's id, last name, and first name of each representative who represents, at a minimum, one customer whose credit is $10,000 using a subquery.

10. Display the same data as in the previous question without using a subquery.

Part B:

11. Display the id and the name of each customer with a current order for a Blender.

12. Display the invoice number and the invoice date for each customer order placed by Charles Appliance and Sport.

13. Display the invoice number and the invoice date for each invoice that contains an Electric Range.

14. Display the invoice number and the invoice date for each invoice that was either placed by Charles Appliance and Sport or whose invoice contains an Electric Range. Use a set operation to perform this query.

15. Display the invoice number and the invoice date for each invoice that was placed by Charles Appliance and Sport and whose invoice contains an Electric Range. Use a set operation to perform this query.

16. Display the invoice number and the invoice date for each invoice that was placed by Charles Appliance and Sport and whose invoice does not contain an Electric Range. Use a set operation to perform this query.

17. Display the product id, the product description, the product price, and the product type for each product whose product price is greater than the price of every part in product type SG. Be sure to correctly choose either the ALL or the ANY operator in your query.

18. Display the same attributes as in the previous question. However, use the other of the two operators: ALL or ANY. This version of the SQL statement provides the answer to a question. What is that question? Add your answer as a comment to your list file.

19. Display the id, the description, the quantity, the invoice number, and the number of units ordered for each product. Make sure to include all products in your output. The order number and the number of ordered units must remain blank for any product that is not contained in an invoice. Order your display by product number.

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M91381379
  • Price:- $60

Guranteed 36 Hours Delivery, In Price:- $60

Have any Question?


Related Questions in DBMS

Assignment -scenario setup a mock phase 3 clinical trial

Assignment - Scenario: Setup a Mock Phase 3 Clinical Trial for evaluating the efficacy of a Blood Pressure/Weight Loss/ or Muscle Strength Enhancement supplement. Assume that the testing takes place at a physician's offi ...

Q1 given the following file for assignment workercom

Q1. Given the following file for assignment worker.com, identify data anomalies that must be removed before data can be loaded in data warehouse. Worker_assignment ← -----------------on course web site File is available ...

Assignmenta restaurant is designing a database to keep

Assignment A restaurant is designing a database to keep track of customer services. A customer is defined as a customer ID, name, address and a telephone number. Customers are served by employees. Each employee is define ...

A taking an unnormalised list describe how you would

(a) Taking an unnormalised list, describe how you would normalise it using the normal forms technique and show how the result of this method is used. (b) You are currently in the process of developing a RDBMS for a natio ...

You can work on this assignment individually or in a group

You can work on this assignment individually or in a group of 2. If you are working in a group please establish a group in Assignment 2 Group on Canvas In this assignment you are asked to explore the use of neural networ ...

You are responsible for keeping track of meal expenses for

You are responsible for keeping track of meal expenses for ten employees while at a business lunch to which your employer has invited you to attend. Write an algorithm that inputs the lunch costs for each the ten employe ...

Question create the physical data model for the logical

Question: Create the physical data model for the logical data model that you submitted in IP3. This should include all of the data definition language SQL. Your submission should include all DDL needed to: Create the tab ...

Databases assignment - monash library services monlib case

Databases Assignment - Monash Library Services (MonLib) Case Study TASK 1: Data Definition For this task you are required to complete the following: 1.1 - Add to your solutions script, the CREATE TABLE and CONSTRAINT def ...

Quesiton 1 what is data-manipulation language dml there are

Quesiton: 1. What is Data-Manipulation Language (DML)? There are four types of access in DML, explain each one. 2. Assume we have a Library Database consists of the following relations: author(author_id, first_name, last ...

Question team project submission - submit to the unit 4

Question: Team Project Submission - Submit to the Unit 4 Group Project Area This version of the capstone project assignment is FOR GRADING this week. Submit to the group area the document containing completed Sections On ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As