Complete the code to select all columns from the table named 'employees'.
SELECT [1] FROM employees;The asterisk (*) symbol is used in SQL to select all columns from a table.
Complete the code to select rows where the 'age' column is greater than 30.
SELECT * FROM employees WHERE age [1] 30;
The '>' operator selects rows where the value is greater than the specified number.
Fix the error in the code to select employees with the last name 'Smith'.
SELECT * FROM employees WHERE last_name [1] 'Smith';
In SQL, '=' is used to compare values for equality. '==' is not valid in SQL.
Fill both blanks to select employees with salary greater than 50000.
SELECT * FROM employees WHERE salary [1] [2];
The '>' operator selects salaries greater than the number 50000.
Fill all three blanks to select employees with age less than 40 and department 'Sales'.
SELECT * FROM employees WHERE age [1] [2] AND department [3] 'Sales';
The code filters employees younger than 40 and in the 'Sales' department using '<', '40', and '=' operators.