Complete the code to select all columns from the employees table.
SELECT [1] FROM employees;The asterisk (*) selects all columns from the table.
Complete the code to filter employees with salary greater than 50000.
SELECT * FROM employees WHERE salary [1] 50000;
The '>' operator filters rows where salary is greater than 50000.
Fix the error in the query to count employees in each department.
SELECT department, COUNT(*) [1] employees GROUP BY department;The FROM keyword specifies the table to select data from.
Fill both blanks to optimize the query by selecting only needed columns and filtering.
SELECT [1] FROM employees WHERE [2] > 100000;
Selecting only the 'name' column and filtering by 'salary' > 100000 improves query efficiency.
Fill all three blanks to create an index on the salary column to speed up queries.
CREATE [1] INDEX [2] ON employees([3]);
Creating a UNIQUE INDEX named 'idx_salary' on the 'salary' column helps optimize queries filtering by salary.
