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

Convert erd to rdm model, Regional Gardens has many nurseries, including Wa...

Regional Gardens has many nurseries, including Wagga Wagga, Bathurst, Albury, Orange, and Dubbo. Each nursery is known by its campus code, eg WW, B, A, O and D respectively. Additi

Explain the recoverable schedule, Explain the Recoverable Schedule A r...

Explain the Recoverable Schedule A recoverable schedule is one in which for each pair of transactions Ti and Tj such that Tj reads a data item formerly written by Ti, the comm

Boyce-codd normal form (bcnf), Boyce-Codd Normal Form (BCNF) The relati...

Boyce-Codd Normal Form (BCNF) The relation NEWSTUDENT (Enrolmentno, Sno, Sname, Cname, Cno,) has every attributes participating in candidate keys as all the attributes are assu

Explain about database system structure, Explain about database system stru...

Explain about database system structure? Storage manager Authorization and integrity manager Transaction manager File manager Buffer manager Storage manager

What is rdbms terminology for a row, What is RDBMS terminology for a row? ...

What is RDBMS terminology for a row? A tuple is a RDBMS terminology for a row

Create a database for their customers, The ABC Bank authority now wants to ...

The ABC Bank authority now wants to create a database for their customers. So you are requested to modify your program of Assignment A3 as follows. The main program first displa

Objectives-file organisation in dbms, Objectives  After reading this un...

Objectives  After reading this unit you should be able to: Explain storage of databases on hard disks; Discuss the execution of various file Organisation techniques;

horizontal fragmentation, Horizontal Fragmentation- Horizontal fragmentati...

Horizontal Fragmentation- Horizontal fragmentation groups together the tuples in a relation that are collectively used by the main transactions. A horizontal fragment is produced b

Modelling and normalisation, Task Part A. Create an ERD from a business pro...

Task Part A. Create an ERD from a business problem. (50 marks) Read the following problem and complete the tasks listed below. THE ABS Blood Bank Australian Blood Services (ABS) i

Type of views-data control, Type of views :  Simple views and Difficult ...

Type of views :  Simple views and Difficult Views Feature Simple Views Complex Views Number of tables One

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