SQL Taskbook Level 6.7
The tables are given:
| id | name | price | employee_id |
|---|---|---|---|
| 1 | product-1 | 3200 | 2 |
| 2 | product-2 | 1500 | 1 |
| 3 | product-2 | 2000 | 1 |
| 4 | product-1 | 4000 | 2 |
| 5 | product-2 | 3200 | 3 |
| 1 | product-3 | 5000 | 3 |
| 1 | product-3 | 1000 | 1 |
| 1 | product-2 | 2500 | 3 |
| 1 | product-1 | 1600 | 2 |
| 1 | product-4 | 5500 | 1 |
| id | name | hire_date |
|---|---|---|
| 1 | Evans | 2023-01-01 |
| 2 | Max | 2020-10-30 |
| 3 | Jim | 2022-12-01 |
Solve the following tasks for them:
Identify the product with the lowest sales amount.
Calculate the number of products processed by each employee.
Select the employee who sold the highest amount of goods.
Choose the employee of the year. The employee of the year is the one who sold the most goods and the most products.