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

Describe the types of attributes, Describe the types of attributes? Ty...

Describe the types of attributes? Types of attributes: An attribute's category determines the type of values that are permitted in the attribute. For instance, the value vers

Describe the relational model, a) Distinguish between ‘database' and ‘Data...

a) Distinguish between ‘database' and ‘Database Management Systems (DBMS)'. b) List and briefly describe five potential benefits of the database approach compared to conventio

Managing databases, Code an Oracle Database trigger to enforce the constrai...

Code an Oracle Database trigger to enforce the constraint that an employee can never change his or her department.

SQL, Ask Write the SQL code that will create the table structure for a tabl...

Ask Write the SQL code that will create the table structure for a table named EMP _1. This table is a subset of the EMPLOYEE table. The basic EMP_1 table structure is summarized in

Microeconomic, anyone have a textbook solutions case fair, 8 edition of vo...

anyone have a textbook solutions case fair, 8 edition of vol 1 ?, please give me

Explain the structure of well formed formulae, Explain the structure of wel...

Explain the structure of well formed formulae in relational calculus. Ans: a. An atom is a formula b. If P1 is a formula, after that so are ¬P1 and (P1) c. If P1 and P2 a

Create a e-r diagram, Information about films holds information about movie...

Information about films holds information about movies, stars and studios. Movies have a title, year of production, length and the film type. Stars have a name and address. Studi

Relational schema for person, Example: RELATIONAL SCHEMA for PERSON: ...

Example: RELATIONAL SCHEMA for PERSON: PERSON (PERSON_ID: integer, NAME: string, AGE: integer, ADDRESS: String) RELATION INSTANCE In this instance, m = 3 and n = 4

Gui interfaces, Draw the database using the ER approach and then make the t...

Draw the database using the ER approach and then make the tables accordingly. Populate the tables so that every table have at least 10 tuples. Then using Java and SQL, execute the

System Analysis and design, Using the questions found at the end of Chapter...

Using the questions found at the end of Chapter 9 in your textbook, complete this homework activity. Students will submit a Word document answering questions 2, 3, and 4.

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