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
Describe analysis of access paths To describe analysis of access paths, consider an example of the design of a company's employee skills database. A part of the object model fr

A database will be made to store information about patients in a hospital. On arrival, each patient’s personal details (name, address, and telephone number) are recorded where poss

Produce a set of relations (equivalent to the Finkelstein entity list) in third normal form (3NF) from the following un-normalised relation. You must use the Finkelstein methodolog


Saving Derived Attributes to Avoid Re-computation Data that is derived from other data should be stored in the computed form to avoid re-computation. For this, we could define

Discuss the count function? The COUNT function used returns the number of tuples or values fixed in a query. The count function comprises two types of syntax: (1) COUNT (*)

Birla Institute of Technology & Science, Pilani Work-Integrated Learning Programmes Division Second Semester 2012-2013 EC-1 Assignment 2 (7.5% of the grade) Course No. : SS ZG

Can you assist me in Database management system? I need help in my courses, please email me at and get back me soon...

What is OOM? Object oriented modeling is an approach by which modeling of systems is done by visualizing the system based on real world concepts. Object oriented modeling does

sql is relationally complete-justify