Write a query that uses the union operator, Database Management System

Assignment Help:

Write a Query that uses the UNION Operator

1. Use the Software Experts database to:  

a. Display the first and the last name of all consultants who worked on any projects for Morningstar Bank.

b. Display the name of each project that consultant Mark Myers has ever worked on, the name of the project's client, and the number of hours that Mark contributed to each project.

 2.  Use the Clearwater Traders database to:

 a. Display each source description from the ORDER_SOURCE table, along with a count of the total number of orders that have been derived from that source. Hint. You will need to use an outer join.

b. List the first and last name, order ID, source description, and order date of every customer who has ever placed an order using the same order sources as customer Alissa Chang. Use a query that contains a sub query.

c. List the inventory ID, item description, item size, color, and shipment quantity for every item that was received on the same date as inventory item 24 in shipment ID 5. Use a query that contains a sub query, and do not include the information for inventory item 24 in the output.

 3.   Use the Northwoods University database to:  

a. List the building code and room of every record in the LOCATION table, and also list the term description, call ID, section number, day, and time of every course ever taught at that location. Format the TIME field so that values appear at times not dates. Hint. You will need to use multiple outer joins.

b. List the first and last names of all faculty members who have ever taught any of the same courses as faculty member Kim Cox or who have ever taught a class in the same room as Kim. Use a query with multiple sub queries.

 4.  Use the Software Experts database to:  

a. List all of the skill descriptions in the SKILL table, as well as the ID of every consultant who is certified for a particular skill. Use an outer join so that if no consultants are certified for a particular skill, the query retrieves the NULL values for the consultant ID value. Hint. Create a view named CERTIFICATION_VIEW that contains IDs (consultant id and skill id) for consultant/skill combinations that are certified, and then perform the outer join using that view.

b. Display the name of each project that consultant Mark Myers has ever worked on, and the first and last name of the consultant who was the manager of the project. Concatenate the manager fields so that the values appear like "Sara Carlson", and assign the column heading "Project Manager" to the manager name output column. Hint. Nest the CONCAT function.

a. Write a query that uses the UNION operator to list the buildings code and room of every location at Northwoods University that is either currently in use as a faculty office or in use as a classroom during the Summer 2007 term.

b. Write a query that uses the INTERSECT operator to retrieve the skill descriptions that are the same for Software Experts consultants Sarah Carlson and Mark Myers.

c. Write a query that uses the MINUS operator to retrieve the skill descriptions that represent the difference between the skills possessed by Software Experts consultant Sara Carlson and the skills possessed by consultant mark Myers.


Related Discussions:- Write a query that uses the union operator

What is functional dependency, A Functional dependency is described by ...

A Functional dependency is described by X Y between two groups of attributes Y and X that are subsets of R specifies a constraint on the possible tuple that can make a relation

Describe the static hash file with buckets and chaining, Describe the stati...

Describe the static hash file with buckets and chaining and show how insertion, deletion and modification of a record can be performed. In static hash file organization, the wo

Data management, Develop a database broker framework to implement a persist...

Develop a database broker framework to implement a persistence mechanism for the domain objects involved in the use case dealt with in Question 2.  a. Specify the attribute type

Generalization and specialization, design a generalization specialization h...

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

Key constraint - relational constraints, This constraint shows that the key...

This constraint shows that the key attribute value in each tuple must be unique, i.e., no two tuples have the similar value for the key attribute. This is because the value of the

What is disadvantages of dbms, What is Disadvantages Of DBMS ? 1. Cos...

What is Disadvantages Of DBMS ? 1. Cost of Software and Hardware and Migration - A important disadvantage of the DBMS system is cost. 2. Reduced Response and Throughpu

List the reg-no of vehicles owned in relational algebra, Given the followin...

Given the following relations Vehicle (Reg_no, make, colour) Person(eno, name, address) Owner(eno, reg_no) Write expressions in the relational algebra to answer the following

Improved availability, Improved availability: The data in a distributed sys...

Improved availability: The data in a distributed system may be replicated so that it is at more than one site. Thus, the failure of a node or a communication link does not necessar

Types of indexes, Types Of Indexes One of the words used during the fil...

Types Of Indexes One of the words used during the file organisation is the term index. In this part, let us describe this term in more detail. We find the index of keywords

Explain cursors in sql, Explain cursors in SQL? Cursors in SQL - An o...

Explain cursors in SQL? Cursors in SQL - An object used to store the output of a query for row-through-row processing through the application programs. Cursors are constructs

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