SQL Taskbook Level 7.4
Given a table:
| id | name | salary | department_id | years_experience |
|---|---|---|---|---|
| 1 | John | 1300 | 1 | 1 |
| 2 | Sam | 300 | 3 | 0 |
| 3 | Jorge | 4300 | 2 | 5 |
| 4 | Peter | 3000 | 2 | 4 |
| 5 | Andrew | 1500 | 3 | 2 |
| 6 | Mark | 800 | 1 | 0 |
| 7 | Donald | 2400 | 4 | 2 |
| 8 | Evans | 1900 | 4 | 2 |
| 9 | Max | 5500 | 2 | 8 |
| 10 | Erick | 1200 | 3 | 1 |
Solve the following problems for her:
Select all employees, their name, salary and number of years of experience. Also add a conditional gradation label to each employee: If the salary is more than 500 and work experience is up to one year, then this is Junior If the salary is more than 1000 and less than 1500 and work experience is from 1 to 2 years, then this is Strong Junior If the salary is more than 1500 and up to 2500 and work experience is from 2 years, then this is Middle If the salary is more than 2500 and less 4500 work experience 5 and more years then it is Senior If the salary is from 4500 and above and work experience 8 and more years then it is 'Staff Engineer' Otherwise it is 'Trainee'