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

Abap/4 statements to access internal tables without header, What should be ...

What should be declared explicitly in the corresponding ABAP/4 Statements to access internal tables without header lines & why? Work Area. This is needed as the Work Area is

Describe the advantage of state chart diagram, Describe the advantage of St...

Describe the advantage of State chart Diagram A state chart represents a state machine, emphasizing flow of control from one state to other. A state machine is a behaviour whi

Database recovery and security, Database Recovery And Security Introdu...

Database Recovery And Security Introduction In this part we will introduce two main issues relating to database management systems. A computer system suffers from dissi

Describe logical data independence, Describe logical data independence ? ...

Describe logical data independence ? Logical Data Independence - It is the capacity to modify the conceptual schema without having to change external schemas or application p

What are the types of storage devices, What are the types of storage device...

What are the types of storage devices? Primary storage Secondary storage Tertiary storage Volatile storage Nonvolatile storage

Create table statements for original database, MySQL statements for extendi...

MySQL statements for extending the database to incorporate new facilities Deliverables for submission You must submit the following deliverables in the Assignment Dropbox in

List the table modification commands in sql, List the table modification co...

List the table modification commands in SQL? A) Deletion B) Updates C) Insertion D) Update of a view

Explain the terms primary key, Explain the terms primary key, candidate key...

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

Use inheritance as an implementation technique, Use inheritance as an imple...

Use inheritance as an implementation technique when you are going to use inheritance as an implementation technique, you can achieve same goal in a safer way by making one cla

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