In this data analysis project, data preprocessing and data visualization task also performed for Employees table.
Data: The Employees table contains six tables such as department, department_employee, department_manager, employee, salary, and title table. Each of those includes information about employees such as employee_id, first_name, last_name, salary, title, department_id, etc.
In this project few SQL queries solved to answer the given questions, all questions are given below:
- Check for data inconsistency.
- Which department has the highest average salary of active employees ? Give some plots to show the avg salary department-wise.
- Which title has the highest avg salary? Give some plots to show the avg salary title-wise.
- Distribution of salary across titles.
- Distribution of salary across departments.
- How many active managers in each department. Is there any department with no manager?
- Composition of titles department-wise. Appropriate plots.
- Composition of departments title-wise. Appropriate plots.
- Salaries of active department managers. Which department's manager who is active earns the most?
- What are the titles of active department managers? Are they managers only?
- Past history of salaries of managers across department (yearly)
- Distribution of salaries of active employees working for more than 10 years vs 4 years vs 1 year.
- Average number of years employees work in the company before leaving (title wise).
- Average number of years employees work in the company before leaving (Dept wise).
- Median annual salary increment department wise.
- Retrieve employees who are also managers.
- Average salaries with department wise and appropritae plot. Find employees who earn more than their department's average salary.
- Find the employee(s) with the highest salary in each department.
Note: Please find attached employees_schema.sql and employee_dump.sql files for performing this data analysis task.