SQL Exercises: Find the first name and last name of employees working for departments with a budget more than Rs. 50000
SQL JOINS: Exercise-28 with Solution
Write a query in SQL to find the first name and last name of employees working for departments with a budget more than Rs.50000.
Sample table: emp_details
SELECT emp_details.emp_fname AS "First Name", emp_lname AS "Last Name" FROM emp_details INNER JOIN emp_department ON emp_details.emp_dept = emp_department.dpt_code AND emp_department.dpt_allotment > 50000;
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous: Write a query in SQL to display the first name and last name of each employee, along with the name and sacntion amount for their department.
Next: Write a query in SQL to find the names of departments where more than two employees are working.
What is the difficulty level of this exercise?