programming-examples/sql/SubqueriesHRDatabase/Write a query in SQL to display the detail information of those departments which starting salary is at least 8000.sql
2019-11-18 14:05:53 +01:00

9 lines
364 B
SQL

/*Write a query in SQL to display the detail information of those departments which starting salary is at least 8000.
*/
SELECT * FROM departments
WHERE department_id IN
( SELECT department_id
FROM employees
GROUP BY department_id
HAVING MIN(salary)>=8000);