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

Production management, create an er diagram for production management in fi...

create an er diagram for production management in film industry

Designing a Human Resources Database LASA1, Scenario: You are a freelance ...

Scenario: You are a freelance database designer who has just been contacted by a small software development company named Altair Software. The president of the company has asked

Sequences-data control, Sequences Sequences: Automatically produ...

Sequences Sequences: Automatically produce unique numbers Are sharable Are typically used to make a primary key value Replace application code Speed up t

What is the difference between link and reference, What is the difference b...

What is the difference between link and reference? The fundamental difference between links and references is that links are symmetrical on the other hand references refer only

Ans the following, discuss the array implementation of a stack.

discuss the array implementation of a stack.

Queries, Find the names of all Albums that have more than 30 tracks. Result...

Find the names of all Albums that have more than 30 tracks. Result: (name: varchar(255))

Secondary indexes, Secondary Indexes Let consider the student database ...

Secondary Indexes Let consider the student database and its clustering index and primary (only one will be applicable at a time). Now consider the state when the database is to

Define the wait for graph, Define the Wait for graph Ans: The wait-for-...

Define the Wait for graph Ans: The wait-for-graph is a directed graph and consist of nodes and directed arcs; the nodes of the graph are active transactions. An arc of the grap

Give expression in both tuple calculus and domain calculus, Consider the fo...

Consider the following relational schema: Doctor(DName,Reg_no) Patient(Pname, Disease) Assigned_To (Pname,Dname) Give expression in both Tuple calculus and Domain calculus for

Student database, tell me the functionality,advantages and disadvantages of...

tell me the functionality,advantages and disadvantages of student database

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