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

What is a hash index, What is a hash index? A hash index organizes the ...

What is a hash index? A hash index organizes the search keys, with their associated pointers, into a hash file structure.

ER diagram, construct an er diagram for a hospital with a set of patients a...

construct an er diagram for a hospital with a set of patients and a set of medical doctors. associate with each patient a log of various test and examination conducted.convert er d

What is an object design, What is an object design? Object design is a ...

What is an object design? Object design is a very interactive method, which decides the relationship among objects, classifies operations on classes, determines overall system

What is a hashing function, What is a hashing function?  What are the prope...

What is a hashing function?  What are the properties of a good hashing function?  Describe the folding technique for hashing functions.      Ans:  Hashing function is a method

What is the object-oriented decompositions, Object-oriented decompositions ...

Object-oriented decompositions Object-oriented decompositions of systems better are able to cope with change. Each subsystem has a well-defined interface which communicates with

What is hierarchical dbms, What is Hierarchical DBMS In HDBMS, data is ...

What is Hierarchical DBMS In HDBMS, data is structured in a tree like manner. There is a parent-child relationship between data items and the data model is very suitable for re

E-commerce and business intelligence systems., Your friend owns and operate...

Your friend owns and operates a wholesale shoe business with annual revenues of $5 million dollars. His wholesale business specializes in supplying and supporting retailers with sh

Explain the internal architecture of 8086, Problem 1. Write an assembly...

Problem 1. Write an assembly program to find the smallest among two numbers Writing an assembly program to find the smallest among two numbers 2. Explain the intern

Why we use delegation to share implementation, Use Delegation to Share Impl...

Use Delegation to Share Implementation The delegation " Delegation comprises of catching an operation on one object and sending it to other object which is part, or related to

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