homeworkstudyhelp

Our Services

Get 15% Discount on your First Order

Use the SaleCo ERD listed below and the provided SQL scripts to…

Use the SaleCo ERD listed below and the provided SQL scripts to construct its relational database and answer the following queries.

Note: Purchases = LINE_PRICE * LINE_UNITS

Note: Inventory value = P_QOH * P_PRICE

 

  1. (2 pts) How many invoices are there?  (3 pts) List the invoice numbers and the invoice dates.
  2. (2 pts) How many customers are there? (3 pts) List the customer codes and customer names.
  3. (2 pts) List vendor numbers and vendor names.  (3 pts) Show the vendor count per state.
  4. (2 pts) Based on price, what is the most expensive product? (3 pts) How much quantity on hand is available for the most expensive product?

5. (5 pts) Display the product description, quantity on hand, and price for all products that have a discount greater than 5%.

  1. (7 pts) Generate a listing of products offered by each vendor. List vendor name, product code and product name. Sort by vendor name and product code.
  2. (5 pts) What is the average discount (rounded to the nearest cent) given by each vendor.
  3. (3 pts) What is the vendor with most “products on hand” for a particular product? (7 pts) What is the vendor with most “products on hand” for all its products combined? List both the vendor name and the number of products. Is it the same vendor in both cases?
  4. (7 pts) Generate a listing of customer purchases, including the subtotals for each of the invoice line numbers; sort output by customer code, invoice number and the line_number.
  5. (7 pts) List the total amount spent by each customer who made purchases during the current invoice cycle—that is, for the customers who appear in the INVOICE table; sort by customer code.
  6. (7 pts) Find a listing of customers who did not make purchases during the invoicing period; sort by customer code.
  7. (7 pts) write a query to produce a summary of the value of products currently in inventory.

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

-draw an ER model clearly denoting maximum and minimum cardinality…

-draw an ER model clearly denoting maximum and minimum cardinality constraints.  -Write one-liner and four sentences for each diagram (statements that specify the minimum and maximum cardinality), and the number of tables needed. Post the Primary and foreign keys and any available attributes. -diagram must be complete in all respects

1. Compare and contrast the tuple relational calculus with domain…

1. Compare and contrast the tuple relational calculus with domain relational calculus. Specifically, discuss the distinction between tuple and domain variables.    2. Answer the following questions considering the Hotel schema I have attached below.a) πhotelName (Hotel ⋈ Hotel.hotelNo = Room.hotelNo (σprice > 50(Room)) ).b) Guest ⊐⊲ (σdateTo≥ ‘1-Jan-2007’ (Booking)). 

 most important steps in solving a math problem is to understand…

 most important steps in solving a math problem is to understand what the problem is asking you to do. Read the problem carefully and make sure you understand what is being asked. Look for keywords and phrases that indicate what operation(s) you need to perform to solve the problem. Identify

Database Model: KimTay The management of KimTay Pet Supplies (a…

Database Model: KimTay The management of KimTay Pet Supplies (a supplier of pet supplies, food, and accessories located in Cody, Wyoming) has determined that the company’s recent growth no longer makes it feasible to maintain customer, invoice, and inventory data using its manual systems. In addition, KimTay Pet Supplies wants

MCQ: Which of the following is true of NoSQL databases? Group of…

MCQ: Which of the following is true of NoSQL databases? Group of answer choices   They are geared toward transaction consistency rather than performance.   They do not support distributed database architectures.   They do not support very large amounts of sparse data.   They are not based on the

7-1 Project Two: Analyzing Databases.  (Please provide Codio…

7-1 Project Two: Analyzing Databases.  (Please provide Codio Screenshots thanks)     Competency In this project, you will demonstrate your mastery of the following competency: Analyze the results of queries constructed to address data requirements Scenario The product manager of Quantigration has asked your data analytics team for a report