Draw output results for following queries Select Name, pQuantity*Price from Customer, Product where CID>5 AND description IN (‘Soap’,’Milk’) 2.Select Description, Sum(oQuantity*Price) FROM Customer c inner join Order o on c.CID=o.CID inner join Invoice i on i.OID=o.OID inner join Product p on p.PID=i.PID AND CITY=’Rawalpindi’ Group By Description Calculate the query cost of the given two relational queries. Write SQL query for both relational queries. PNAME (((sCITY!= ‘Rawat’(Customer)) ⋉CID(Order)) ⋈OID(soquantity!=3 (Invoice))) 2.PPrice(sPID=I.PID^O.OID=I.OID(((sPrice>30(Product)) x Invoice))x(soid!=3 (Order))) Write a procedure which takes order’s and invoice’s information as argument and insert data in relevant Before insertion make sure following points must not be violated. CID and PID must exists in Customer and product table respectively. oQuantity given for invoice table must be less than or equal to the quantity of that particular product exists in Product table. If product is cigarette, it must not be sold to customers whose age is less than 20. In that case data must not be inserted. Write a procedure which takes customer id as argument and return name of customer and his/her total bill of all orders. You must display Customer name and total bill which is returned by procedure in main body.
Draw output results for following queries Select Name, pQuantity*Price from Customer, Product where CID>5 AND description IN (‘Soap’,’Milk’) 2.Select Description, Sum(oQuantity*Price) FROM Customer c inner join Order o on c.CID=o.CID inner join Invoice i on i.OID=o.OID inner join Product p on p.PID=i.PID AND CITY=’Rawalpindi’ Group By Description Calculate the query cost of the given two relational queries. Write SQL query for both relational queries. PNAME (((sCITY!= ‘Rawat’(Customer)) ⋉CID(Order)) ⋈OID(soquantity!=3 (Invoice))) 2.PPrice(sPID=I.PID^O.OID=I.OID(((sPrice>30(Product)) x Invoice))x(soid!=3 (Order))) Write a procedure which takes order’s and invoice’s information as argument and insert data in relevant Before insertion make sure following points must not be violated. CID and PID must exists in Customer and product table respectively. oQuantity given for invoice table must be less than or equal to the quantity of that particular product exists in Product table. If product is cigarette, it must not be sold to customers whose age is less than 20. In that case data must not be inserted. Write a procedure which takes customer id as argument and return name of customer and his/her total bill of all orders. You must display Customer name and total bill which is returned by procedure in main body.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Draw output results for following queries
- Select Name, pQuantity*Price from Customer, Product where CID>5 AND description IN (‘Soap’,’Milk’)
2.Select Description, Sum(oQuantity*Price) FROM
Customer c inner join Order o on c.CID=o.CID
inner join Invoice i on i.OID=o.OID
inner join Product p on p.PID=i.PID
AND CITY=’Rawalpindi’
Group By Description
- Calculate the query cost of the given two relational queries.
- Write SQL query for both relational queries.
- PNAME (((sCITY!= ‘Rawat’(Customer)) ⋉CID(Order)) ⋈OID(soquantity!=3 (Invoice)))
2.PPrice(sPID=I.PID^O.OID=I.OID(((sPrice>30(Product)) x Invoice))x(soid!=3 (Order)))
- Write a procedure which takes order’s and invoice’s information as argument and insert data in relevant Before insertion make sure following points must not be violated.
- CID and PID must exists in Customer and product table respectively.
- oQuantity given for invoice table must be less than or equal to the quantity of that particular product exists in Product table.
- If product is cigarette, it must not be sold to customers whose age is less than 20. In that case data must not be inserted.
- Write a procedure which takes customer id as argument and return name of customer and his/her total bill of all orders. You must display Customer name and total bill which is returned by procedure in main body.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY