SQL Basics - SQL online course | LearnSQL.com

PHOTO EMBED

Tue Aug 09 2022 08:21:25 GMT+0000 (UTC)

Saved by @vnmshenoy #undefined

select department,max(salary),min(salary)
from employees
where year=2014
group by department
content_copyCOPY

Show all departments together with their lowest and highest salary in 2014.

https://learnsql.com/track/sql-from-a-to-z/course/sql-queries/order-by-group-by/group-by/min-max-group-by