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
Problem 1. Describe the following a) Advantages of Database Systems b) Functions of a DBMS Explanation of part (a) and (b) 2. Explain the following concepts w

What are ways of finding out either an update is required or not for derived attributes? The ways to find out an update is required or, not are as: Explicit update

Consider the E/R schema with weak entity sets shown below. Come up with the SQL CREATE TABLE statements (with appropriate primary key, unique and foreign key constraints). Include

What is called query processing? Query processing refers to the range of activities included in extracting data from a database.

Example :; transfers transfer_amount from x's account to y's account ; Supposes x&y both accounts exist TRANSACTION (x, y, transfer_amount) Start transaction IF X AND Y

These are the binary operations; i.e., each is applied to two relations or sets. These two relations can be union compatible excluding in case of Cartesian product. Two relations R

Automated system for appointment with sms and call confirmation with service providers and user has to be initiate automatically. After selecting time and date to use service, s

For every n-ary relationship type R where n>2, we make a new table S to represent R. We contain as foreign key attributes in s the primary keys of the relations that show the parti

a) Distinguish between ‘database' and ‘Database Management Systems (DBMS)'. b) List and briefly describe five potential benefits of the database approach compared to conventio