Write an SQL query to retrieve the names of employees who belong to the 'Sales' department and have a salary greater than 60000.

Last Updated :
Discuss
Comments

Write an SQL query to retrieve the names of employees who belong to the 'Sales' department and have a salary greater than 60000.

SELECT name FROM employees WHERE department = 'Sales' AND salary > 60000;

SELECT name FROM employees WHERE department = 'Sales' OR salary > 60000;

SELECT name FROM employees WHERE department = 'Sales' HAVING salary > 60000;

SELECT name FROM employees GROUP BY department, salary HAVING department = 'Sales' AND salary > 60000;

Share your thoughts in the comments