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 are the features of embedded SQL? Explain. Embedded SQL - SQL could be implemented within two ways. It can be used interactively or embedded in a host language or throu

Question: i) Explain the terms data warehousing and data mining. ii) Discuss the importance of the following security principles that a digital firm should amongst others, n

construct a B+ tree for the following set of key value (2,3,5,7,11,19,23,29,31) in ascending order where the pointers that will fit in one node is as follows:A. four B. six C. eigh

management information system based on functional organisation

A database is to be constructed to remain track of the teams and games of a sport league. A team has a number of players, not all of whom participate in every game. It is desired

For your chosen project, you need to identify the current problem that you wish your project to solve.  Produce a Problem Statement.  The Problem Statement should explain the purpo

Explain weak and strong entity type ? Weak and Strong entity type: An entity set which does not have a primary key is referred to as a weak entity set. The existence of a wea

what would go in order patient#, patient name, patien address, surgeon#, surgeon name, surgery date, surgery type, drug admin

If one requires to access data using Logical Database , the use of events is unavoidable. Yes, if someone wants to access data using Logical database then the use of events

Differentiate between various levels of data abstraction? Data Abstraction - Abstraction is the procedure to hide the irrelevant things from the users and represent the rele