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

9 lines
364 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*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);