Review of additional issues DISTINCT 1. Select title codes and descriptions of the titles that are...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Review of additional issues DISTINCT 1. Select title codes and descriptions of the titles that are actually used by the employees of the company (see also outer joins). OUTER JOIN 1. Select title codes and descriptions of the titles that are actually used by the employees of the company (see also distinct). 2. For each department, list the code and name, followed by the names of employees working in the department (if any). 3. For the task 6 of SQL Review 4, for the employee who is not supervised by anyone, assign NULL as the supervisor's ID and retrieve the needed data. CREATE TABLE Title ( Title Code varchar(255) not null Primary Key, Title Discription varchar(255), Salary Number(11)); insert into Title (Title_Code, Title_Discription, Salary) values (T1', 'Accountant", "10000"); insert into Title (Title Code, Title Discription, Salary) values (T2', 'Analyst", "20000'); insert into Title (Title_Code, Title_Discription, Salary) values (T3", "Programmer", "30000"), insert into Title (Title Code, Title Discription, Salary) values (T4', 'DBA', '40000"); insert into Title (Title Code, Title_Discription, Salary) values (T5', 'Manager', '50000"); CREATE TABLE Department ( dep_Code number(11) not null Primary Key, dept Name varchar(255), location varchar(255), Dept Type varchar(255)); insert into Department(dep_Code,dept_name,location, Dept Type) values ('001', 'Computer Center', 'Boston', 'IT'); insert into Department(dep_Code,dept_name,location, Dept Type) values ('002', 'Budget', 'New York', 'Business"); insert into Department(dep_Code,dept_name.location, Dept Type) values Dept Type) values insert into Department(dep_Code,dept_name.location, Dept Type) values ('005', 'Purchasing', 'New York', 'Business'); ('003', 'Marketing', 'Boston', 'Marketing'); insert into Department(dep_Code,dept_name,location, ('004', 'Database Support', 'Cleveland', 'IT'); CREATE TABLE Employee ( ID number(11) not null Primary Key, emp Name varchar(255), empl Type varchar(255), dept Code number(11) not null, null, title Code varchar(255) not constraint fk_dep_Code foreign key (dep_Code) references Department(dep_Code). Constraint fk_title_Code foreign key (title_Code) references Title(title_Code)); insert into Employee(ID, emp_name,empl_Type,dept Code,title_Code) values (1', 'John', 'Full-time', '002', 'T1'); insert into Employee(ID, emp_name,empl_ Type,dept Code,title_Code) values (2, 'Adam', 'Consultant', '001', 'T3'); insert into Employee(ID, emp_name,empl_Type,dept Code,title_Code) values (3', 'Mary', 'Part-time', '004', 'T4"); insert into Employee(ID, emp_name,empl_Type,dept Code,title_Code) values (4', 'Peter', 'Full-time', '003', 'T2'); insert into Employee(ID, emp_name,empl Type,dept Code,title_Code) values ('5', 'Scott', 'Consultant', '002', 'T1'); insert Employee(ID, emp_name,empl_Type,dept Code,title_Code) values ('6'. "Susan', 'Full-time', '005', 'T5'); insert into Employee(ID, emp_name,empl Type,dept Code,title_Code) values (7', 'Alex', 'Part-time', '004", "T2"); Review of additional issues DISTINCT 1. Select title codes and descriptions of the titles that are actually used by the employees of the company (see also outer joins). OUTER JOIN 1. Select title codes and descriptions of the titles that are actually used by the employees of the company (see also distinct). 2. For each department, list the code and name, followed by the names of employees working in the department (if any). 3. For the task 6 of SQL Review 4, for the employee who is not supervised by anyone, assign NULL as the supervisor's ID and retrieve the needed data. CREATE TABLE Title ( Title Code varchar(255) not null Primary Key, Title Discription varchar(255), Salary Number(11)); insert into Title (Title_Code, Title_Discription, Salary) values (T1', 'Accountant", "10000"); insert into Title (Title Code, Title Discription, Salary) values (T2', 'Analyst", "20000'); insert into Title (Title_Code, Title_Discription, Salary) values (T3", "Programmer", "30000"), insert into Title (Title Code, Title Discription, Salary) values (T4', 'DBA', '40000"); insert into Title (Title Code, Title_Discription, Salary) values (T5', 'Manager', '50000"); CREATE TABLE Department ( dep_Code number(11) not null Primary Key, dept Name varchar(255), location varchar(255), Dept Type varchar(255)); insert into Department(dep_Code,dept_name,location, Dept Type) values ('001', 'Computer Center', 'Boston', 'IT'); insert into Department(dep_Code,dept_name,location, Dept Type) values ('002', 'Budget', 'New York', 'Business"); insert into Department(dep_Code,dept_name.location, Dept Type) values Dept Type) values insert into Department(dep_Code,dept_name.location, Dept Type) values ('005', 'Purchasing', 'New York', 'Business'); ('003', 'Marketing', 'Boston', 'Marketing'); insert into Department(dep_Code,dept_name,location, ('004', 'Database Support', 'Cleveland', 'IT'); CREATE TABLE Employee ( ID number(11) not null Primary Key, emp Name varchar(255), empl Type varchar(255), dept Code number(11) not null, null, title Code varchar(255) not constraint fk_dep_Code foreign key (dep_Code) references Department(dep_Code). Constraint fk_title_Code foreign key (title_Code) references Title(title_Code)); insert into Employee(ID, emp_name,empl_Type,dept Code,title_Code) values (1', 'John', 'Full-time', '002', 'T1'); insert into Employee(ID, emp_name,empl_ Type,dept Code,title_Code) values (2, 'Adam', 'Consultant', '001', 'T3'); insert into Employee(ID, emp_name,empl_Type,dept Code,title_Code) values (3', 'Mary', 'Part-time', '004', 'T4"); insert into Employee(ID, emp_name,empl_Type,dept Code,title_Code) values (4', 'Peter', 'Full-time', '003', 'T2'); insert into Employee(ID, emp_name,empl Type,dept Code,title_Code) values ('5', 'Scott', 'Consultant', '002', 'T1'); insert Employee(ID, emp_name,empl_Type,dept Code,title_Code) values ('6'. "Susan', 'Full-time', '005', 'T5'); insert into Employee(ID, emp_name,empl Type,dept Code,title_Code) values (7', 'Alex', 'Part-time', '004", "T2");
Expert Answer:
Answer rating: 100% (QA)
DISTINCT From this query we will get the distinct entries of title codes description ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
The lodging expense of an employee who is not away from home overnight can never be deductible. Do you agree with this statement? Explain.
-
List the names and number of employees supervised (label this value HeadCount) for each supervisor who supervises more than two employees.
-
Exhibit 1.16 presents common-size income statements and balance sheets for six firms that operate at various stages in the value chain for the pharmaceutical industry. These common-size statements...
-
Which of the following statements best describes the 'dilation' in rock mechanics? a. Movement of the rock along the shear direction during the direct shear tests b. Radial expansion of the intact...
-
Refer to Exercise 3-30. In Exercise 3-30 Journalize the adjusting and closing entries of Kopec Production Company at December 31. There was only one adjustment to Service Revenue. Required 1. After...
-
For each of the following lists of premises, derive the indicated conclusion and complete the justification. In problems 4 and 8 you can add any statement you choose. (1) 1. S H 2. B E 3. R G 4....
-
The Anchor Glass Container Corporation and its parent company, Consumers Packaging, Inc. (CPI), entered into a series of agreements with Encore Glass, Inc., to supply glass containers of a specific...
-
(Multiple-step and Single-step) Two accountants for the firm of Elwes and Wright are arguing about the merits of presenting an income statement in a multiple-step versus a single-step format. The...
-
Development economics studies the transformation of emerging nations into more prosperous one and it seeks to understand and shape the country's macro and microeconomics policies in order to lift...
-
As the volunteer business manager for the New City Band (City Band), you are responsible for preparing the operating budget for the organizations upcoming summer concert season. Each year, City Band...
-
Programming Exercise #1: Circle Class circumference diameter radius Write a class named Circle based on the UML diagram above. You may omit the constructors for now: Circle() and Circle(r: double).
-
Distinguish between statement of affairs and balance sheet.
-
List the various advantages of computerised accounting systems.
-
Describe the various types of accounting software along with their advantages and limitations.
-
Explain how the following may be ascertained from incomplete records: (a) Opening capital and closing capital (b) Credit sales and credit purchases (c) Payments to creditors and collection from...
-
What do you understand by database. How does it differ from DBMS?
-
Gizmo Warm-up One way to compare two numbers is to "lot them on a number line, such as the one in the Rational Numbers, Oppocites, and Absolute Values Girmo. in the imo, click the ""oom in (+) button...
-
Using the information presented in Problem 13.4B, prepare a partial statement of cash flows for the current year, showing the computation of net cash flows from operating activities using the...
-
What factors are important in selecting a market target?
-
What information does management require to analyze the selling situation?
-
Explain the logic of pursuing a marketdriven strategy.
-
______________ occur(s) when the speaker should pause but instead fills the silence (umm, ahh).
-
Identify an election (federal, state, or local) for which a debate was broadcast. Analyze how the different speakers were able to adapt their messages based on the moderators questions and their...
-
___________ refers to your credibility as a presenter as well as the credibility of the information delivered in your presentation.
Study smarter with the SolutionInn App