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
Describe the functions and features of foreign key? Foreign Key : The primary key of one file or table that is implanted in another file or table to implement the relationships

What is Nested Trigger? A trigger can also having INSERT, UPDATE and DELETE logic within itself, so when the trigger is fired because of data modification it can also cause ano

The Second Normal Form (2NF) Definition: A relation is in 2NF if it is in 1NF and each non-key attribute is fully dependent on each candidate key of the relation. Some of th

What is difference among mysql_connect and mysql_pconnect? Mysql_connect() opens a new connection to the database while mysql_pconnect() opens persistent connection to the data

What is nested relational model? The nested relational model is an extension of relational model in which domains might be either atomic or relation valued.

Assignment #1 Data Management The questions on this exam are based on the Baxter Aviation case scenario. 1. (5 points) The systems analyst proposes the following two relationshi

Describe the candidate key functions ? Candidate Key and Alternate Key: In some instances, an entity will have more than one attribute which can serve as a primary key. Any key


Differentiate between natural join and outer join? Natural join is a binary operator which is written as (R * S) where as R and S are relations. The output of the natural join

what is database management system? & why it is required?