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

  Why would you choose a database system instead of simply

Why would you choose a database system instead of simply storing data in operating system files? When would it make sense not to use a database system?

  1 create a function that returns the day of the week for a

1. create a function that returns the day of the week for a specified date.create or replace function

  One of the needs that your client has is a databaseto

one of the needs that your client has is a database.to design a database a database planner should spend a considerable

  Find all governors general of australia

Find all Governors General of Australia who were Barons at the time and Restrict your query to Governors General who were Barons at the time of their appointment

  1 code an oracle database trigger to enforce the constraint

1. code an oracle database trigger to enforce the constraint that an employee can never change his or her department.2.

  Display structure of the i_model table

Display structure of the i_model table. Display all the information stored in the i_model table belonging to car group ‘A4'.

  Database concurrency control and data security

Database concurrency control and data security and describe how the data is displayed and extracted.

  1 not having an appropriate index can cause a full table

1. not having an appropriate index can cause a full table scan while performing the select statement by using a

  Construct an entity relationship diagram

Explain the differences between the notions of Database (DB), Database Management System (DBMS) and Database System (DBS).

  Concept of schema

a) Given a particular blog post, what are all of the comments associated with it?yes b) What are the blog posts for a particular user?

  Create an xml file with markup tags

Create an XML file with markup tags and some sample data to represent a list of invoices. Include the XML tags for two invoices in the list. Also, assume the invoices are created from a database whose tables are shown in the following database rela..

  Your company has put in the request for a new database

your company has put in the request for a new database system and you have been tasked with architecting the security

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