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
Information about a bank is about customers and their account. Customer has a name, address that consists of house number, area and city, and one or more phone numbers. Account ha

Question: (a) What do you meant by content management and briefly describe four major components of a Content Management System? (b) Explain key benefits of a Content Manage

Define Signal. It allows methods to respond to events triggered by themselves or by other processes. Each signal corresponds to an exacting event. A signal is represented in Sy

Your friend owns and operates a wholesale shoe business with annual revenues of $5 million dollars. His wholesale business specializes in supplying and supporting retailers with sh

I need solution of the question posted at http://www.expertsmind.com/questions/sql-query-for-testing-triggers-and-stored-procedures-30140149.aspx

Insertion Anomaly: Inability to show certain information-The primary key of the over relation be (enrolment number, Cno). Any new tuple to be inserted in the relation should have

What are the two distinct aspects to the implementation of associations? i) It is required to define data declarations which will enable details of actual links to be stored. I

What is an entity relationship model? The entity relationship model is a set of basic objects known as entities and relationship between those objects. An entity is a thing or

What is the use of a slotted-page structure and what is the information are there in the header? The slotted-page structure is used for organizing records within a one block.

Mention the several levels in security measures. A) Database system B) Operating system C) Network D) Physical Human