The average amount of their orders , Database Management System

Make SQL statements for the following scenarios. Your response should contain SQL statement, output and any other assumptions you have made to arrive at the answer.
For Colorado customers compute the average amount of their orders and the number of orders placed. The result should contain the customer number, customer last name, average order amount and the number of orders placed.

Query:

selectc.CUSTFIRSTNAME, c.CUSTLASTNAME, avg(p.PRODPRICE), count(ol.ORDNO) from customer c,ordertblot,ordlineol,product p where c.custno=ot.custno and ot.ordno=ol.ordno and p.PRODNO=ol.PRODNO group by c.CUSTFIRSTNAME,c.CUSTLASTNAME;

440_00.png

Posted Date: 3/20/2013 7:49:15 AM | Location : United States







Related Discussions:- The average amount of their orders , Assignment Help, Ask Question on The average amount of their orders , Get Answer, Expert's Help, The average amount of their orders Discussions

Write discussion on The average amount of their orders
Your posts are moderated
Related Questions
Data Base Management System 1. Draw the Architecture of MySQL and explain about its subsystems briefly. 2. Elaborate with the help of an example the concept of Primary key a

Benefits and Limitations od Data Models?

What is catalog in DBMS? Catalog - A relational DBMS maintains information about every table and index in which it contains. A catalog is a collection of special tables that st

Explain the θ-join and equijoin Refer tables Car and Boat which list models of cars and boats and their relevant prices. Assume a customer wants to buy a car and a boat, but sh

What are the advantages of embedded query language? Give an example of an embedded SQL query. Embedded query language - SQL could be implemented within two ways. It can be us

Convert the following ER - diagram (Entity Relationship Diagram) into a relational database (the primary keys are underlined): 2160_Convert the following ER - diagram into a

Problem : (b) A deductive database system is essentially the outcome of applying mathematics logic to database management, where logic is used for both data representation and

Explain the ISA relationship Answer: ISA relationship - ISA notation is employed in generalization/ specialization to depict relationship among lower and higer level entity s

What are metrics for choosing the best algorithm? Matrices for choosing the best algorithms are as below: Computational complexity Ease of understand ability and im