TASK #202 · MediumDepartments repeat in the list
Your brief
A list of departments that have at least one employee earning more than
170000 is needed. Each department must appear once.
Departments repeat in the list: each appears as many times as it has such employees.
Output name (department name).
Departments repeat in the list: each appears as many times as it has such employees.
Output name (department name).
Ctrl / ⌘ + ↵
Result
Write a query and run it to see the results.
Schema
departmentsid, nameemployeesid, name, department_id, manager_id, salary, hired_atcustomersid, name, registered_atordersid, customer_id, employee_id, amount, created_atloginsuser_id, logged_at