single products ordered, Database Management System

Assignment Help:

For Colorado customers calculate the number of single products ordered. If a product is purchased on multiple orders, it should be counted only single time. The result should contain customer number, customer last name and the number of single products ordered.

Query:
select c.CUSTNO,c.CUSTFIRSTNAME,c.CUSTLASTNAME,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.CUSTNO,c.CUSTFIRSTNAME,c.CUSTLASTNAME,ol.ordno;

565_00.png


Related Discussions:- single products ordered

Which product produces the relation that has attributes, Which product prod...

Which product produces the relation that has attributes of R1 and R2 ? Cartesian product produce the relation which has attributes of R1 and R2

What are partial and natural key, What are partial, alternate,, artificial,...

What are partial, alternate,, artificial, compound and natural key? Partial Key: It is a set of attributes that can uniquely recognize weak entities and that are related to s

Write the motivations led to development of oo-dbms, Write the motivations ...

Write the motivations led to development of OO-DBMS? 1.  Programmer frustration with RDBMSs. 2.  Requirement for special features.

Data Analysis, A buyer for a large department store chain must place orders...

A buyer for a large department store chain must place orders with an athletic shoe manufacturer six months prior to the time the shoes will be sold in the department stores. In par

What is data block, What is data block? Data Block - In oracle the data...

What is data block? Data Block - In oracle the data blocks are referred to as tablespaces. A tablespace is an fields of disk consisting of one or more disk files. A tablespace

Determine the derived attribute to avoid re-computation, Determine the Deri...

Determine the Derived attribute to avoid re-computation Each class box consists of an ordered list of attributes and operations, each represented as a next string. We can find

Database management issues, You are required to write a report which evalua...

You are required to write a report which evaluates two of the following issues in relation to your case study database: a. Security issues b. Performance issues c. Backup

Attribute preservation, Attribute Preservation This is a easy and obvio...

Attribute Preservation This is a easy and obvious necessity that includes preserving all the attributes that were there in the relation that is being decomposed.

Difference between internal tables and extra datasets, What is the differen...

What is the difference between internal tables and extract datasets? The lines of an internal table always have the similar structure. By using extract datasets, you can ha

Column constraints, Column Constraints: NOT NULL, UNIQUE, CHECK, PRIMARY K...

Column Constraints: NOT NULL, UNIQUE, CHECK, PRIMARY KEY, DEFAULT, REFERENCES, On  delete  Cascade :  Using  this  key  whenever  a  parent  row  is  removed  in  a referenced

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