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...
-
A gas is contained in a vertical, frictionless piston - cylinder device. The piston has a mass of 3.2 kg and a crosssectional area of 35 cm2. A compressed spring above the piston exerts a force of...
-
Find all real solutions. Check your results. 6 35 + 36 = 0
-
The following financial information is known about Pfizer, Inc. for the year ended December 31, 2015. (all amounts in millions): yom a. The balance of cash and cash equivalents was \($3,641\). b....
-
TyroneCo, an S corporation with a positive E & P balance, reports gross receipts for the year totaling $400,000 (of which $200,000 is PII). Expenditures directly connected to the production of the...
-
Journalize the following adjustments. (Credit account titles are automatically indented when the amount is entered. Do not indent manually. If no entry is required, select "No Entry" for the account...
-
Posse Corporation plans to form a foreign subsidiary through which to conduct a new business in Country J. Posse projects that this business will operate at a loss for several years. a. To what...
-
Part 1: Market Timing This question explores uncertainty in investing. Assume you plan to invest in a broad-based equity index. You start with a zero balance account. Each year, you plan to...
-
What does the auditor need to consider in determining the nature, timing and extent of tests of control?
-
Which of the following statements best describes the role of materiality in a financial statement audit? a. Materiality refers to the material from which audit evidence is developed. b. The higher...
-
Preplanning the audit includes: a. Understanding the client and the clients industry. b. Determining audit engagement team requirements. c. Ensuring the independence of the audit team and audit firm....
-
A client has used an inappropriate method of accounting for its pension liability on the balance sheet. The resulting misstatement is moderately material, but the auditor does not consider it to be...
-
The Public Company Accounting Oversight Board a. Is a quasi-governmental organization that has legal authority to set auditing standards for audits of public companies. b. Is a quasi-governmental...
-
write research article on ethical culture with summary, discussion and references
-
The senior management at Davis Watercraft would like to determine if it is possible to improve firm profitability by changing their existing product mix. Currently, the product mix is determined by...
-
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.
-
What does the United States export? Import?
-
Discuss the growth in world trade.
-
Explain and discuss the difference between absolute advantage and comparative advantage.
Study smarter with the SolutionInn App