Create a query returns the first name-last name


Discuss the below:

Q1- 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.

Q2- 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.

Q3- 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.

Attachment:- Data information.rar

Solution Preview :

Prepared by a verified Expert
PL-SQL Programming: Create a query returns the first name-last name
Reference No:- TGS01938960

Now Priced at $25 (50% Discount)

Recommended (98%)

Rated (4.3/5)