CREATE TABLE employees ( employee_id INT PRIMARY KEY, first_name VARCHAR(50), last_name VARCHAR(50), department_id INT, salary DECIMAL(10, 2), hire_date DATE ); Write a SQL query to retrieve the names (first name and last name) and salaries of employees who work in the 'Sales' department and have a salary greater than $50,000.
The SELECT statement is used to specify the columns we want to retrieve from the employees table (first_name, last_name, and salary). The FROM clause specifies the source table, which is employees. The WHERE clause filters the results based on two conditions: department_id should match the department_id for the 'Sales' department obtained from the departments table. salary should be greater than $50,000. This query retrieves the names and salaries of employees who meet both conditions specified in the WHERE clause visit https://www.databasehomeworkhelp.com/sql-homework-help/