single products ordered, Database Management System

Assignment Help:

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


Related Discussions:- single products ordered

E-R, Mention various steps required to draw an E-R Diagram. Draw an E-R Dia...

Mention various steps required to draw an E-R Diagram. Draw an E-R Diagram for Student Information System. Mention all suitable assumptions to justify your answer.

Views, what is view?explain

what is view?explain

Advantages of Observation Methods, Advantages of Observation  Methods: ...

Advantages of Observation  Methods: Bailey has pointed  out four  advantages of observation: 1. Superior in Data  Collection  on Non Verbal Behavior: When  a person  a opi

B+ tree, construct a B+ tree for the following set of key value (2,3,5,7,11...

construct a B+ tree for the following set of key value (2,3,5,7,11,19,23,29,31) in ascending order where the pointers that will fit in one node is as follows:A. four B. six C. eigh

Express the queries in relational algebra, Question: This question refe...

Question: This question refers to the database schema. a) Express the following queries in SQL: (i) Write the SQL code that will create the table Company. Your answer sh

Data replication, Data Replication "If a relation R has its copies kept...

Data Replication "If a relation R has its copies kept at two or more sites, then it is considered replicated". But why do we replicate a relation? There are several advan

ERD, A student entity type has the following attributes,name..

A student entity type has the following attributes,name..

Create table and insert data manufacturer-dbms, Create a table according to...

Create a table according to given data:  AmbulanceDriver(Driver_Number#, Name, Address, Birth_Date) AmbulanceDriverTeam(Team_Number#, Driver_Number#, Join_Date, Lea

Explain dynamic two-phase locking, Explain Dynamic Two-Phase Locking H...

Explain Dynamic Two-Phase Locking Here a transaction locks a data item instantly earlier than any operation is applied on the data item.  After finishing all the operations on

Defining internal classes and operations, Defining Internal Classes and Ope...

Defining Internal Classes and Operations When we enlarge algorithms, new classes can be added to the store intermediate results. A complex operation could be looked at, as a c

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd