The average amount of their orders , Database Management System

Assignment Help:

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


Related Discussions:- The average amount of their orders

ER diagrams, explain exhaustively the problems associated with ER diagrams....

explain exhaustively the problems associated with ER diagrams. include illustrations in your answer

Create a new user-data control, Create a new user : CREATE USER IDENTI...

Create a new user : CREATE USER IDENTIFIED BY Example: //CREATE USER MCA12 IDENTIFIED BY W123 Grant: It is used to give database access permission to users. It is of

Fragmentation-design of distributed databases, Fragmentation: It is defini...

Fragmentation: It is definite as partitioning of a relation into various fragments.Every fragment can be stored at a dissimilar site.

Entity integrity constraint - relational constraints, It defines that no pr...

It defines that no primary key value can be null. This is as the primary key is used to recognize individual tuple in the relation. So we will not be able to recognize the records

Hashing, how to implement mid square hashing?

how to implement mid square hashing?

Relational algebra, Relational Algebra is a set of basic operations used to...

Relational Algebra is a set of basic operations used to influence the data in relational model. These operations allow the user to specify basic retrieval request. The result of re

Time stamp ordering, explain in detail about time stamp orderting/

explain in detail about time stamp orderting/

What are the dbms languages, What are the DBMS languages? Explain.  Ans...

What are the DBMS languages? Explain.  Ans: a) Data Definition Languages (DDL): It is employed to specify database schema for example CREATE DROP statements etc.     b)  Dat

The transactions, The Transactions- A transaction is definite as the unit o...

The Transactions- A transaction is definite as the unit of work in a database system. Database systems that deal with a huge number of transactions are also termed as transaction p

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd