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
The Incident table, with an auto-incrementing incident number, etc, looks like: incident_num reporter date time incide

You will be analysing a set of financial data of your choice. It is not necessary to collect any primary data of your own, and publicly available secondary data will be sufficient

What is recursive closure? Why is it not possible to describe this operation in relational algebra? Recursive closure is applied to recursive relationship. An instance of rec

Regional Gardens has many nurseries, including Wagga Wagga, Bathurst, Albury, Orange, and Dubbo. Each nursery is known by its campus code, eg WW, B, A, O and D respectively. Additi

Define page. The database is partitioned into some number of fixed-length blocks, which are referred to as pages.

What does the cardinality ratio specify? Mapping cardinalities or cardinality ratios state the number of entities to which another entity can be associated. Mapping cardinaliti

XYZ is a large chain of home entertainment rental over 100 stores distributed over all states in Australia. XYZ lends entertainment products such as movies, TV shows and games on v

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

What are the categories of SQL command? SQL commands are separated in to the following categories: 1. Data - Definitition Language 2. Data Manipulation language 3. Dat

Define Timestamp ordering Ans In timestamp-based method, a serial order is made among the concurrent transaction by assigning to every transaction a unique nondecreasing number