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.

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;


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
Project: Microsoft Access You have been asked by the ABC Tanning Salon to create a database that can be used to track the salon's customers.  You are to create a table in Access

Consider entity type Employee with attributes empNumber (this is unique), empName, and the year when he/she was hired. An employee can either be a technical employee, a marketing e

With the help of a diagram defines the typical element modules of a DBMS? The functional elements of a database system can be widely divided into: 1) Storage manager and 2) q

What is primary Key Explain? Primary Key - Primary key is one of the candidate keys. It should be selected such in which its attribute values are never, or very rarely, chang

Which is the properties of entities? Attributes is the properties of entities.

Explain several types of constraints that can be specified using CREATE TABLE command. Explain CASCADE and RESTRICT clauses of DROP SCHEMA command? Constraint Description PRIM

Project Description: This is a Customer Management project. Customer data is presented in a text file. The program can load this text data into its database columns. The data ma

In E-R diagram how generalization is represented? in E-R diagram generalization is represented by Triangle shape.

Cyber Transit Ltd keeps up-to-date information on the processing and current position of each dispatched item. Dispatched items are the main concern of the Cyber Transit product tr

design a generalization specialization hierarchy for a motor vehicle sales company. the company sells motorcycles, passenger cars, vens and buses.