1-Guided Activity Tryout
1-Guided Activity Tryout
1-Guided Activity Tryout
-SOLUTIONS
2) For employees who quit the organization, find out how many years the employees
were employed. Assume that the year consists of 365.25 days. Also retrieve the
EMPLOYEE_ID, JOB_ID, START_DATE, and END_DATE for these employees
3) Query the JOBS table and return a single expression of the form The Job Id for the
<job_title’s> job is: <job_id>. Take note that the job_title should have an apostrophe
and an “s” appended to it to read more naturally. A sample of this output for the
organization president is: “The Job Id for the President’s job is: AD_PRES.” Alias this
column expression as “Job Description” using the AS keyword.
1) Retrieve a list of all FIRST_NAME and LAST_NAME values from the EMPLOYEES
table where FIRST_NAME contains the character string “li.”
2) Envelope printing restricts the addressee field to 16 characters. Ideally, the
addressee field contains employees’ FIRST_NAME and LAST_NAME values
separated by a single space. When the combined length of an employee’s
FIRST_NAME and LAST_NAME exceeds 15 characters, the addressee field should
Page 1 of 2
contain their formal name. An employee’s formal name is made up of the first letter of
their FIRST_NAME and the first 14 characters of their LAST_NAME. You are
required to retrieve a list of FIRST_NAME and LAST_NAME values and formal
names for employees where the combined length of FIRST_NAME and LAST_NAME
exceeds 15 characters.
3) Write a Query that displays the employee number, hire date, number of months
employed, six-month review date, first Friday after hire date, and the last day of the
hire month for all employees who have been employed for fewer than 150 months
and working for department 50
3) You are requested to query the LOCATIONS table for rows with the value US in the
COUNTRY_ID column. An expression aliased as LOCATION_INFO is required to
evaluate the STATE_PROVINCE column values and returns different information as
per the following table. Sort the output based on the LOCATION_INFO expression.
Page 2 of 2