This laboratory gives practice in the creation and use of

Assignment Help Programming Languages
Reference no: EM13465241

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.

Reference no: EM13465241

Questions Cloud

Description discuss how research principles and practices : a illustrate the impact of scientific principles and practiceson a healthcare situation.description discuss how
Which of the following is a disadvantage of forced : which of the following is a disadvantage of forced distribution?may be inaccurate if a group of employees is either
Which of the following pertains to the amount of time : which of the following pertains to the amount of time people take to prepare for an interview and their overall job
What is the purpose of environmental scanningnbsp how has : nbsp1.briefly explain each of the four functions of management and explain how they are interconnectednbsp2.what is
This laboratory gives practice in the creation and use of : this laboratory provides practice in the creation and use of basic and advanced sql queries involving more than one
In what sense does spinoza recognize god and nature explain : in what sense does spinoza identify god and nature? what is the relationship between active nature and passive nature?
Mark lawrence has been pursuing a vision for more than two : mark lawrence has been pursuing a vision for more than two years. this pursuit began when he became frustrated in his
What are examples of organizational resourcesand how : 1.identify and explain the different types of organizational structures.nbsp which type of structure do you feel is
Discuss why it is important to use more than one type of : discuss why it is important to use more than one type of font in layout design? consider and cite an example of a piece

Reviews

Write a Review

Programming Languages Questions & Answers

  Draw and implement class which contains instance data

Draw and Implement the class called "Box" which contains instance data (all doubles) that represents height, width, and depth of the box. Also include boolean variable called "full" as instance.

  Program to compute net pay of employee

A program to compute net pay of employee. It must permit one to read deposit number, account name, amount deposited, and yesr.check.

  Program to assign new value to first element of array

Suppose that the ArrayList of integers named has been declared and initialized. Write single statement which assigns a new value to first element of the ArrayList.

  Program to convert temperature in celcius from fahrenheit

Write the program which accepts the temperature in Fahrenheit from user and conversts it to Celsius by subtracting 32 from Fahrenheit value and multiplying result by 5/9. Show both values.

  Program to swap values from variables

Given two int variables, firstPlaceWinner and secondPlaceWinner , write some code that swaps their values. Declare any additional variables as necessary.

  Compute and display total number of votes received

Display the table with appropriate labels for the rows and columns. Compute and display the total number of votes received by each candidate and the percentage of the total votes cast.

  Describe issues-web site designers when adding multimedia

Describe some of the issues web site designers must consider when adding multimedia to a web site. Consider issues such as bandwidth, server load, or others you consider to be important. Please provide references.

  Explain programming is designed to demonstrate the areas

This programming lab is designed to demonstrate the following areas of knowledge within C++, The difficult part is intended to be the decision-making required to both parse the file input and to correctly draw the resulting vector.

  Write a code to find the mean-median and mode

Use computer program to write a code (choose any language)to find the mean, median, mode ,variance and standard deviation.

  Creating a software package for amazon

Suppose you are creating a software package for Amazon.com that needs users to enter their own passwords. Your software requires that users' passwords meet the following criteria:The password should be at least six characters long.

  Produce the necessary instructions to swap the values

Assume variables x and y are stored in memory locations 100 and 101. Using machine language instructions from section 5.2.4, produce the necessary instructions to swap the values of x and y.

  Write program to accept name and score of all batsmen

Write a program to accept name and score of all batsmen of a team and print them in the given manner: INPUT:names[]={nam1,nam2,nam3,nam4,nam5,nam6} & scores[]={48,65,73,10,90,84}

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd