subject

An ecommerce store uses a database with the following schema: Product(pid, pname, price) Customer(cid, cname, address) Order(oid, cid, date, total) cid foreign key to Customer
LineItem(lid, oid, pid, quantity) oid, pid foreign keys to Order, Product
Products and Customer contains a set of products and of customers respectively. Order represent orders placed by customers: each order has several lines, called LineItems, each line representing one product that the customer ordered. Each Orders record also stores the total value of the order, which is the sum of price*quantity for all line items in that order.
The following constraints must be enforced:
All keys (including primary and foreign keys)
All attributes are not null. price > 0
In addition, the business logic is such that the total in each order equals the sum of price*quantity for all line items in that order.
a. Find all customers that placed an order in the past month where all line items are for products with price > 15.
b. The total cost of every order must be equal to the sum of each line item quantity times the associated product price. If the total is not accurate, then that order must be inspected by a staff. Write a query that finds all orders with inconsistencies.
c. The company’s revenue is the sum of all totals, from all orders. Write a query that computes how much the company’s revenue would increase, if the price of the ’puzzlebot’ product increased by 15%.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:30
To insert a column without using commands in any tabs, a user can -click and then click insert column.
Answers: 3
question
Computers and Technology, 23.06.2019 01:30
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most? a)give the file a unique name b)name the file in yymmdd format c)use descriptive name while naming the files d)use capital letters while naming the file
Answers: 3
question
Computers and Technology, 23.06.2019 16:30
You have read about the beginnings of the internet and how it was created. what was the internet originally created to do? (select all that apply) share research. play games. communicate. share documents. sell toys
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Enzo’s balance sheet for the month of july is shown. enzo’s balance sheet (july 2013) assets liabilities cash $600 credit card $4,000 investments $500 student loan $2,500 house $120,000 mortgage $80,000 car $6,000 car loan $2,000 total $127,100 total $88,500 which expression finds enzo’s net worth?
Answers: 1
You know the right answer?
An ecommerce store uses a database with the following schema: Product(pid, pname, price) Customer(c...
Questions
question
Mathematics, 07.04.2020 19:39
question
Health, 07.04.2020 19:39
question
Mathematics, 07.04.2020 19:40
Questions on the website: 13722362