Académique Documents
Professionnel Documents
Culture Documents
FROM employees;
2. Show the structure of the EMPLOYEES table. Create a query to display the last
name, job code, hire date, and employee number for each employee, with
employee number appearing first. Provide an alias STARTDATE for the HIRE_DATE
column.
3. Display the last name and department number of all employees in departments
20 and 50 in
alphabetical order by name.
4. Display the employee last name, job ID, and start date of employees hired
between February
20, 1998, and May 1, 1998. Order the query in ascending order by start date.
5. For each employee, display the employee’s last name, and calculate the number
of months
between today and the date the employee was hired. Label the column
MONTHS_WORKED.
6. For each employee, display the employee number, last_name, salary, and salary
increased by
15% and expressed as a whole number.
7. Create a unique listing of all jobs that are in department 80. Include the location
of the
department in the output.
8. Display the employee last name and employee number along with their
manager’s last name
and manager number. Label the columns Employee, Emp#, Manager, and
Mgr#,respectively.
9. Write a query to display the last name, job, department number, and department
name for all
employees who work in Toronto.
13. Create a query to display the employee numbers and last names of all
employees who earn more
than the average salary. Sort the results in ascending order of salary.
14. Display the last name, department number, and job ID of all employees whose
department location ID is 1700.
15. Display the last name, hire date, and day of the week on which the employee
started. Label
the column DAY.
16. Write a query to display the last name and hire date of any employee in the
same
department as Bruce. Exclude Bruce.