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.


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;


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
Explain the terms primary key, candidate key, alternate key and secondary key. In the given table identify every key? STUDENT(SID,Regno, Name, City) Primary Key: The prim

What are the properties of transaction? There are three properties of transactions :- A)     Atomicity B)      Consistency C)       Isolation

Define the Boyce-Codd Normal Form with instance and also Compare BCNF and 3NF.  Ans: BCNF: For each functional dependency X->Y in a set F of functional dependencies over relati

What is Gathering information and Producing ERD Gathering information: This could be a written document that explains the system in question with reasonable quantity of detai

Which are the two ways in which entities can participate in a relationship? Total and partial are the two ways in which entities can participate in a relationship

Entities Let us first be aware of the question: What are entities? An entity is an object of concern used to show the things in the actual world, e.g., table, car, bo

Describe Interfaces for the DBA? Interfaces for the DBA - Most database systems holds privileged commands which could be used only through the DBA's staff. These involves com

We need help in Booking System for Golf Business Development of a web based booking system which permits clients to book golf lessons with the following features- a) 4 user p

how many types of data model in DBMS? explain data abstraction with its different level

Vertical Fragmentation- Vertical fragmentation groups together only those attributes in a relation that are used jointly by various important transactions. A vertical fragment is d