Completed
Incomplete
Not Attended
Completed
Incomplete
Not Attended
TechCorp, a growing technology company, has hired you to help manage their employee database. As their SQL expert, you're tasked with writing queries to help the HR department and management team make informed decisions about their workforce. The database contains information about each employee, including their name, department, position, hire date, and salary. Your job is to provide insights and help manage employee data effectively.
The HR department wants to know the average salary for each department. Can you provide a list of departments and their average salaries, rounded to two decimal places?
Management wants to give a 5% raise to all employees who have been with the company for more than 2 years. Update the salaries for eligible employees and then display their names, new salaries, and the amount of the raise. (Assume current date as '2024-12-20')
HR notices that the 'IT' department is missing a manager. Add a new employee named 'Eva Green' as the IT Manager, with today's date as the hire date and a salary of 90000.00. Then display all employees in the IT department. (Assume current date as '2024-12-20')
The company is planning its budget for the next year. They need to know the total salary expenditure for each department, as well as the percentage of the total company salary that each department represents. Can you provide this information?
id | name | department | position | hire_date | salary |
1 | John Doe | Sales | Manager | 2020-01-15 | 75000.00 |
2 | Jane Smith | Marketing | Specialist | 2021-03-01 | 60000.00 |
3 | Bob Johnson | IT | Developer | 2019-11-01 | 80000.00 |
4 | Alice Brown | HR | Coordinator | 2022-06-15 | 55000.00 |
5 | Charlie Wilson | Sales | Representative | 2021-09-01 | 50000.00 |
>>> Submit Your Query to validate