Queries on joins and unions

Assignment Help Database Management System
Reference no: EM13929925

1- Provide an explicit JOIN SQL statement that returns the store ID, store name, manager employee first and last name fields,

manager employee grade, the city and state fields of the store. Only unique rows should be returned. Note that the 4th field in

the Employee table is the employee grade field, the 2nd field in the Store table is the Store name, and the 3rd field in the Store

table is the manager's ID. All ID fields are of a numeric type.

2- Write a query that returns the first name, last name, id, city and state fields from the Employee, User and Store tables. To

return these fields from all three tables, UNION keywords must be applied. Note that the first name, last name and id are to be

returned in one single alphabetical field, with a space separating first from last, and a dash character, '-', separating last from ID.

For the Store table, the store name is returned, along with the store id, separated by a dash character.

3- Write a query that contains a subquery, which returns the store name, manager last name, city, state and country fields from

the Store table. Hint: A JOIN should not be used; A subquery should be used instead.

1443_Week2_SQL_Data.gif

Reference no: EM13929925

Questions Cloud

Premerger information about bidding firm-target firm : Consider the following premerger information about a bidding firm (Firm B) and a target firm (Firm T). Assume that both firms have no debt outstanding. Firm B Firm T Shares outstanding 5,600 2,200 Price per share $ 45 $ 19 Firm B has estimated that t..
The process of understanding and specifying : 1. (TCO 3) The process of understanding and specifying what an information system should do is:         systems design.       systems construction.       systems analysis.
Carbon single bond : A carbon-carbon single bond has a bond energy of approximately 348kJ/mole
What is the minimum annual synergy that three guys feels : Three Guys Burgers, Inc., has offered $15.5 million for all of the common stock in Two Guys Fries, Corp. The current market capitalization of Two Guys as an independent company is $14.3 million. Assume the required return is 9 percent and the synergy..
Queries on joins and unions : Provide an explicit JOIN SQL statement that returns the store ID, store name, manager employee first and last name fields, manager employee grade, the city and state fields of the store
Can high performing organizations impact recruitment : Can high performing organizations impact recruitment or retention? Can organizational leaders lose focus on the importance of safe and healthy work environments?
The wavelength in nanometers : the wavelength, in nanometers, of the spectral line produced when an electron in a hydrogen atom undergoes the transition from the energy level n = 3 to the level n = 1.
Process of process of producing a gamma camera : Describe the process of process of producing a gamma camera image including the preparation of the patient and how the gamma camera works. You will need to include a fully labelled diagram of the gamma camera and refer to it in your answer
Cause marketing is a very popular concept : Cause Marketing  is a very popular concept in marketing strategy today.  It is defined as a wide variety of commercial activity that aligns or joins a company or brand with a cause to generate business AND create societal benefits.

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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