Computers and Technology

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%.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 22:40, shaylawaldo11
Write a program that defines symbolic names for several string literals (chars between quotes). * use each symbolic name in a variable definition. * use of symbolic to compose the assembly code instruction set can perform vara = (vara - varb) + (varc - vard); ensure that variable is in unsigned integer data type. * you should also further enhance your symbolic logic block to to perform expression by introducing addition substitution rule. vara = (vara+varb) - (varc+vard). required: debug the disassembly code and note down the address and memory information.
Answers: 3
image
Computers and Technology, 23.06.2019 02:30, chaaaa
People with high self-esteem: accept their strengths and weaknesses. believe that failed experiences are failures of their whole self. feel good about who they are only when they reach total success. need positive external experiences to counteract negative feelings that constantly plague them.
Answers: 1
image
Computers and Technology, 23.06.2019 16:30, jessisjawsome
If i wanted to include a built-in calendar in a document, what option could i select? draw table insert table insert chart quick tables
Answers: 1
image
Computers and Technology, 23.06.2019 21:00, shyshy1791
Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from greatest to least?
Answers: 1
Do you know the correct answer?
An ecommerce store uses a database with the following schema: Product(pid, pname, price) Customer(c...

Questions in other subjects: