SQL Subquery Exercises: Display the detail information of departments which starting salary is at least 8000
SQL SUBQUERY: Exercise-49 with Solution
Write a query in SQL to display the detail information of those departments which starting salary is at least 8000.
Sample table: departments
Sample table: employees
SELECT * FROM departments WHERE department_id IN ( SELECT department_id FROM employees GROUP BY department_id HAVING MIN(salary)>=8000);
department_id department_name manager_id location_id 70 Public Relations 204 2700 90 Executive 100 1700 110 Accounting 205 1700
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous: Write a query in SQL to display the the details of those departments which max salary is 7000 or above for those employees who already done one or more jobs.
Next: Write a query in SQL to display the full name (first and last name) of manager who is supervising 4 or more employees.
What is the difficulty level of this exercise?