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
what would go in order patient#, patient name, patien address, surgeon#, surgeon name, surgery date, surgery type, drug admin

Describe the definition of a transaction in SQL  Ans: The SQL transaction starts implicitly. Transactions are finished by either Commit work that commits the transaction and st

Attributes having a one value for a particular entity. For instance, Age is a single valued attribute of a student entity. Attributes  that  have  more  than  single  values

Define average seek time. The average seek time is the average of the seek times, calculated over a sequence of random requests.

Structure of Client Server Systems: In client/server architecture, clients show users who require services while servers give services. Both client and server are a combination of

How do you find the final model after iterative analysis? Why is iterative analysis of any of the problem needed? The final model serves as the base for system architectur

What Is Sql?  Structured Query Language (SQL) is a standard query language. It is usually used with all relational databases for data manipulation and definition. All the re

A database administrator''s responsibilities and data contents

Demonstrate the UML model Using UML, it is possible to generate code in any of the programming language from UML model (called forward engineering) and rebuild a model from an

what is entity in database system?