single products ordered, Database Management System

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

Posted Date: 3/20/2013 7:51:27 AM | Location : United States







Related Discussions:- single products ordered, Assignment Help, Ask Question on single products ordered, Get Answer, Expert's Help, single products ordered Discussions

Write discussion on single products ordered
Your posts are moderated
Related Questions
under what condition log based recovery is feasible?


Optimistic Concurrency Control Is locking the only way to stop concurrency related problems? There exist some other ways too. One such way is known as an Optimistic Concurrency

How are tables stored on Disk? We realise that every record of a table can have different amounts of data. This is due to in some records; some attribute values may be "zero".

What is hashing file organization? In the hashing file organization, a hash function is computed on some attribute of every record. The result of the hash function specify in

Describes the several relationship constraints through giving suitable example? Constraints on relationships: There are two kinds of constraints on relationships. 1) Mapping


Increases efficiency : Data is stored close to most often used site, therefore retrieval would be faster. Also, data that is not required by local applications is not stored, there

How can one distinguish among different kinds of parameters? Input parameters are used to pass data to subroutines. Output parameters are used to pass data from subrout

Adding Redundant Associations for Efficient Access Redundant associations do not add any type of information, therefore during design we should actually examine structure of o