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 create an index on the 'email' column to improve search speed.
CREATE INDEX idx_email ON users([1]);Creating an index on the 'email' column helps speed up queries filtering by email.
Fix the error in the query to select employees with salary greater than 50000.
SELECT * FROM employees WHERE salary [1] 50000;
The '>' operator selects salaries greater than 50000.
Fill both blanks to create a table with an auto-incrementing primary key.
CREATE TABLE products (id [1] [2] PRIMARY KEY, name VARCHAR(100));
The 'id' column should be an INT and AUTO_INCREMENT to generate unique IDs automatically.
Fill all three blanks to select the average salary grouped by department.
SELECT [1], AVG([2]) FROM employees GROUP BY [3];
We select the department, calculate the average salary, and group results by department.
