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 15:00
The three logical operators used to write compound conditions are "and," "or," and "not." a: true b: false
Answers: 2
question
Computers and Technology, 22.06.2019 21:00
Kirk found a local community college with a two-year program and he is comparing the cost with that of an out-of-state two-year school. what is the expected total cost for one year at the local community college if kirk lives at home? what is the expected total cost for one year at the out-of-state school if kirk lives on campus?
Answers: 2
question
Computers and Technology, 23.06.2019 04:31
Type the correct answer in the box. spell all words correctly. the managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
Write pseudocode to represent the logic of a program that allows the user to enter a value. the program multiplies the value by 10 and outputs the result.
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, 05.03.2021 15:40
question
Mathematics, 05.03.2021 15:40
question
Mathematics, 05.03.2021 15:50
question
Mathematics, 05.03.2021 15:50
question
History, 05.03.2021 15:50
Questions on the website: 13722363