Display the invoice number and the invoice date

Assignment Help Database Management System
Reference no: EM13811426

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.

Reference no: EM13811426

Questions Cloud

Describe the applicable process model : Can you describe the Applicable process model, and data models - the Analysis Phase.
Design a clean and normalized database : Design a clean and normalized database that handles books for a library application. You need to consider the following rules before you design the database: All books are mapped to categories. For example, the book Distributed Operating System bel..
How does video brand globalization and resistance affect you : How does the video "Brands, Globalization & Resistance" affect you? How the logo represents the brand?
Consumerism and planned obsolescence : Consumerism and Planned Obsolescence
Display the invoice number and the invoice date : Display the invoice number, the invoice date, the customer id, and the customer name for each order in the database
Risk-free rate-what is the market risk premium : Porter Inc's stock has an expected return of 12.25%, a beta of 1.25, and is in equilibrium. If the risk-free rate is 5.00%, what is the market risk premium?
Construct a truth table for the given statement form : Construct a truth table for the given statement form, then state whether or not the given statement form is a tautology - Determine whether the following argument is valid.
Considering two bonds-yield to maturity : You are considering two bonds. Bond A has a 9% annual coupon while Bond B has a 6% annual coupon. Both bonds have a 7% yield to maturity, and the YTM is expected to remain constant.
Describe how a bill becomes a law at the national level : Describe how a bill becomes a law at the national level, in a fully developed essay. Support your work with cited sources, references to Lecture Notes, or URLs where you obtained your information.

Reviews

Write a Review

Database Management System Questions & Answers

  Allows users to view and register for classes offered

Users will be able to register in order to use the system. If the user is register they will be prompted to enter their username and password to navigate through the system.

  Define the importance of various system analysis

By now you should have a "toolbox" full of useful design and analysis tools. List the tools in your toolbox and then write one short paragraph on how you can/will apply them in your careers, lives, etc.

  Bioinformatics for representing sequence annotation

The GFF3 format is a commonly-used one in bioinformatics for representing sequence annotation and which ID (cv_id) corresponds to the GO ontology stored in the database and how many controlled vocabulary terms (cvterm table) are linked to the GO onto..

  Explain the statement that relational algebra operators can

Explain the statement that relational algebra operators can be com-posed. Why is the ability to compose operators important?

  Choose a suitable indicator to plot the measure

Determine how you will collect the data elements needed for this measure (i.e. how will you collect the data elements needed to calculate the measure). Describe what those data elements are, and how they will be collected.

  Conceptual database scheme for the csrss

Develop an E/R diagram to represent the conceptual database scheme for the CSRSS and list the information of all doctors who are specialized is heart surgery.

  Design entity-relationship model of the problem

You are required to design using an E-R diagram an entity-relationship model of the problem, convert the model into a relational model, and assess the normal form of each schema.

  How to design and create tables

Databases are powerful tools for storing, managing, manipulating, and accessing data. Most information systems in use today make use of some form of database. In this lesson you will learn about the Access user interface (UI), how to design and ..

  Can you identify any dependencies that hold over s

Consider a relation R with ?ve attributes ABCDE. You are given the following dependencies: A → B, BC → E, and ED → A.

  What tables and columns would you create in relational data

You need to store information on the business's employees, inventory, and completed sales. You also need to account for the fact that each salesperson receives a different percentage of their sales in commission. What tables and columns would you ..

  Explain steps of process in increasing cardinalities

When increasing cardinalities from 1:N to N:M, which of the given steps are included in process the order of steps listed below is not relevant, only steps themselves?

  Compare two non-sequential file structure models

Compare the two non-sequential file structure models. What advantages does the first one have over the second and what advantages does the second have over the first?

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