SQL Subquery Exercises: Display the first name and last name of employees working for the department which allotment amount is more than Rs.50000
SQL SUBQUERY: Exercise-36 with Solution
36. Write a query in SQL to display the first name and last name of employees working for the department which allotment amount is more than Rs.50000.
Sample table: emp_department
Sample table: emp_details
SELECT emp_fname, emp_lname FROM emp_details WHERE emp_dept IN (SELECT dpt_code FROM emp_department WHERE dpt_allotment > 50000);
Contribute your code and comments through Disqus.
Previous: Write a query in SQL to display all the details of employees who works in department 89 or 63.
Next: Write a query in SQL to find the departments which sanction amount is larger than the average sanction amount of all the departments.
What is the difficulty level of this exercise?