Question
SQL 1. Display the last name and current job title of each employee, along with the department name they are currently working in. Label the
SQL
1. Display the last name and current job title of each employee, along with the department name they are currently working in. Label the columns "LAST NAME", "JOB TITLE", and "DEPARTMENT". .
2. Display the average salary for each department, along with the department name and the number of employees in that department. Label the columns "DEPARTMENT", "AVERAGE SALARY", and "NUMBER OF EMPLOYEES".
3. Display the last name, hire date, and current salary for all employees who have received a promotion since their hire date. Label the columns "LAST NAME", "HIRE DATE", "CURRENT SALARY", and "PROMOTION DATE".
4. Display the first name, last name, and salary of all employees who have a salary that is higher than the average salary for their department. Label the column "EMPLOYEE", "SALARY", and "DEPARTMENT".
5. Display the last name, hire date, and salary for all employees who have been with the company for more than 5 years. Label the columns "LAST NAME", "HIRE DATE", and "SALARY".
6. Display the concatenation of employees last name and salary (separated by comma) under the column heading "EMPLOYEES AND THEIR SALARIES ".
7. Display the last name, hiredate, salary and salary increased by 10% for each employee. Label the new column NEW SALARY.
8. Display the full name, salary and add a column that subtracts the old salary from the new salary. Label the column INCREASE. The new salary is increased by 10%.
9. Display the first name and last name of employees whose first name contain N in the last second character.
10. For each employee, display the employees last name and calculate the number of months between today and the date the employee was hired. Label the column MONTHS_WORKED. Order your results by the number of months employed.
11. Display the first name and salary of all employees in the following format: earns $ but wants $ Label the column Dream Salaries.
12. Display the last name, hire date, and day of the week on which the employee started. Label the column DAY. Order the results by the week starting with Monday.
13. Find the date 30 days from now.
14. Write a query that displays the employees last names and commission amounts. If an employee does not earn commission, put No Commission. Label the column COMM.
15. Display first name and last name and hire date of employees who were hired in the month of MAY. Display the date in the following format: 31st of OCT 2016, Monday
16. Display first name and last name of employees who were hired before 2010.
17. What is the last day of the current month?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started