![]() Format the dates to appear in the format similar to “Monday, the Thirty. Display each employee’s last name, hire date, and salary review date, which is the first Monday after six months Format the salary to be 15Ĭharacters long, left-padded with $. Create a query to display the last name and salary for all employees. SELECT last_name || ' earns '|| TO_CHAR(salary, 'fm$99,999')|| ' monthly but wants '|| TO_CHAR(salary * 3, Write a query that produces the following for each employee: earns monthly but ![]() ORDER BY MONTHS_BETWEEN(SYSDATE, hire_date) ħ. Round the number of months up to the closest whole number. Order your resultsby the number of monthsĮmployed. For each employee, display the employee’s last name, and calculate the number of months between today and theĭate the employee was hired. Modify lab2_6 to display the last name, salary, and commission for all employees whoseĬommission amount is 20%. Display the last name, job, and salary for all employees whose job is sales representative or stock clerk and Display the last name of all employees who have an a and an e in their last name.ġ2. Display the last names of all employees where the third letter of the name is an a.ġ1. ORDER BY salary DESC, commission_pct DESC ġ0. Sortĭata in descending order of salary and commissions. Display the last name, salary, and commission for all employees who earn commissions. Display the last name and job title of all employees who do not have a manager.ĩ. Display the last name and hire date of every employee who was hired in 1994.Ĩ. ![]() SELECT last_name "Employee", salary "Monthly Salary"ħ. Label the columns Employee and Monthly Salary, Modify lab2_3 to list the last name and salary of employees who earn between $5,000 and ![]() Display the last name and department number of all employees in departments 20 and 50 inĦ. Order the query in ascending order by start date.ĥ. Display the employee last name, job ID, and start date of employees hired between February 20,ġ998, and May 1, 1998. Place your SQL statement in a text file named lab2_3.Ĥ. Modify lab2_1 to display the last name and salary for all employees whose salary is not in Your SQL statement to a file named lab1_7.ģ. Hire date, and employee number for each employee, with employee number appearing first. Create a query to display the last name, job code, Show the structure of the EMPLOYEES table. Select all data from the DEPARTMENTS table.ħ. Show the structure of the DEPARTMENTS table. A comma is missing after the column, LAST_NAME.Ħ. The alias should read ANNUAL_SALARY or be enclosed The ANNUAL SALARY alias cannot include spaces. The multiplication operator is *, not x, as shown in line 2. Can you identify them?įROM employees – The EMPLOYEES table does not contain a column called sal. There are four coding errors in this statement. The following SELECT statement executes successfully:ĥ. The following SELECT statement executes successfully:Ĥ. iSQL*Plus commands access the database.ģ. Initiate an iSQL*Plus session using the user ID and password provided by the instructor.Ģ. Atif Student Name Dilawar Khan CMSID 45898 Department Software Engineering Section Fall- 1.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |