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 06:00
Write a function that draws a pool ball. this function should take as parameters, the color, the number that should go on the pool ball, and the location of the center of the pool ball. the radius of the pool balls should be pool_ball_radius, and the font of the number should be pool_ball_font. the text of the pool ball font should be white. drawpoolball(color.orange, 5, 100, 100); drawpoolball(color.green, 6, 50, 200); drawpoolball(color.red, 3, 150, 350); drawpoolball(color.blue, 2, 250, 140); to center the numbers on the pool ball, you should use the getwidth() and getheight() methods. you are allowed to call these methods on your text object, such as txt.
Answers: 3
question
Computers and Technology, 22.06.2019 22:30
Write a full class definition for a class named player , and containing the following members: a data member name of type string .a data member score of type int .a member function called setname that accepts a parameter and assigns it to name . the function returns no value.a member function called setscore that accepts a parameter and assigns it to score . the function returns no value.a member function called getname that accepts no parameters and returns the value of name .a member function called getscore that accepts no parameters and returns the value of score .this is what i have, aparently this is wrong: class player{private: string name; int score; public: void player: : setname (string n){name =n; }void player: : setscore (int s){score = s; }string player: : getname (){return name; }int player: : getscore (){return score; }};
Answers: 2
question
Computers and Technology, 24.06.2019 07:00
You are most likely to automatically encode information about
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
Type the correct answer in the box. spell all words correctly. what is the default margin width on all four sides of a document? by default, the document has a margin on all four sides.
Answers: 1
You know the right answer?
An ecommerce store uses a database with the following schema: Product(pid, pname, price) Customer(c...
Questions
Questions on the website: 13722360