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 meant by normalization of data? It is a process of examining the given relation schemas based on their Functional Dependencies (FDs) and primary key to achieve the prop

A basic model of Database Access Control Models of database access control have grown out of previous work on protection in operating systems. Let us talk about one simple mode

Define Sequence A sequence is a set of integers 1, 2, 3 that are generated in order on demand. Sequences are regularly used in databases because lots of applications require ev

How to use Oracle

Describe an data dictionary? A data dictionary is a data structure which keeps meta data about the structure of the database ie. the schema of the database.

Question: (a) List four disadvantages of the File Processing System as compared to the Database Systems. (b) The integrity of a database is enforced by integrity rules. One

Illustrate the class diagram for class room scheduling system If in any college, the number of classrooms are limited which have to be allocated to various classes and instruct

(a) Why did SAP introduce the extended star schema?

Write an sql statement to find what is the percentage of home policies which are from the state of Arizona out of all Home policies by Policy Value.

What is a hash index? A hash index organizes the search keys, with their associated pointers, into a hash file structure.