Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 28
- SELECT employee_nm FROM topic_2.salary
- ORDER BY salary DESC;
- --
- 29
- SELECT department_nm, AVG(salary) AS avg_salary,
- MIN(salary) AS min_salary, MAX(salary.salary) AS max_salary, COUNT(*) AS number_of_people
- FROM topic_2.salary
- GROUP BY department_nm
- ORDER BY avg_salary DESC;
- 30 - 31
- SELECT (MAX(salary) - AVG(salary)) AS Отклонение_Максимальной_От_Средней,
- (MAX(salary) - MIN(salary)) AS Отклонение_Максимальной_От_Минимальной, department_nm
- FROM topic_2.salary
- GROUP BY department_nm
- 32
- SELECT department_nm FROM topic_2.salary
- GROUP BY department_nm
- ORDER BY SUM(salary) ASC;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement