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 is an object design? Object design is a very interactive method, which decides the relationship among objects, classifies operations on classes, determines overall system

What is assertion? Mention the forms available. An assertion is a predicate expressing a condition that we wish the database always to satisfy. Domain integrity constraints.

explain exhaustively the problems associated with ER diagrams. include illustrations in your answer


What is a foreign key, and what is it used for? A foreign key is used to establish relationships between relations in the relational model. Technically, a foreign key is a colu

Project Description: Critical Project for VMware Technical support. VMWare ESXi 5.1 support for upgradation and migration problem. Technical expert of Vmware needed. Sk

What are the states of transaction? The states of transaction are:- a) Active b) Partially committed c) Failed d) Aborted e )Committed   f) Terminated

An object-oriented design process  1. Define the context and modes 2. Designs the system architecture 3. Identifies the principal system objects 4. Identifies concurrency in

What is the full form of ODBC ? ODBC stands for Open Database Connectivity.

differences between a classified catalog and a dictionary catalog