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
What is first normal form? The domain of attribute must contain only atomic (simple, indivisible) values.


ADVANCE OBJECT DESIGN Introduction Analysis is the initial step of the OMT methodology. It is apprehensive with devising a precise, concise, correct and understandable mo

Create centralized relational database using Top down method- Construction of Logical Model: Translation EERD into Relational Schema: Use the 8 steps algorithm of converting EERD

Primary Index In primary index, there is a one-to-one relationship among the entries in the index table and the records in the major table. Primary index can be of two types:

The following relational database schema represents part of a simplified database used by a library: tblBook (BookID, Title, PublisherID, Category,Price) tblPublisher (Publishe

What are the ways of obtaining the connection parameters?  Hardwire the parameters into the program. Ask for the parameters interactively. Get the parameters

Example : Search the name, department number and salary of employees drawing minimum salary in that department. SELECT ENAME, SAL, DEPTNO  FROM EMP WHERE SAL IN (SELECT MI

what would go in order patient#, patient name, patien address, surgeon#, surgeon name, surgery date, surgery type, drug admin

What is Multivalued Attribute? Multivalued Attribute - Multivalued attribute might have more than one value for an entity. For instance, PreviousDegrees of a STUDENT.