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 Enterprise Resource Planning (ERP), and what kind of a database is used in an ERP application? Enterprise Resource Planning (ERP) is an information system used in manuf

What is DML (Data Manipulation Language)? This language that enable user to access or manipulate data as organised by appropriate data model. Procedural DML or Low level: DM

Explain in detail about Collaboration Diagrams Collaboration diagrams are interaction diagrams which emphasize structural organisation of an object that transmit and receive m

Explain the concept of a data model ? Data Model - Model is an abstraction procedure which hides irrelevant details although highlighting details relevant to the application

Define Query by Example QBE is a query language relies upon domain calculus and has two dimensional syntax. The queries are written in the horizontal and vertical dimensions of

Q.   Why would you choose a database system instead of simply storing data in operating system file? Define  at a base concept in details. Sol. Advantages of Database over Fil

File Organisation And Its Types  Just as arrays, trees, lists and other data structures are used to execute data Organisation in main memory, a number of planning's are used to

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

4. Describe three ways to handle missing field values

What is called as recursive partitioning? The system repeats the splitting of the input unless each partition of the build input fits in the memory. Such partitioning is known