Complete the code to select all columns from the employees table.
SELECT [1] FROM employees;Using * 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 for salaries greater than 50000.
Fix the error in the query to count employees in each department.
SELECT department, COUNT([1]) FROM employees GROUP BY department;Using COUNT(*) counts all rows per department correctly.
Fill both blanks to create a query that lists employee names and their salaries, ordered by salary descending.
SELECT [1], [2] FROM employees ORDER BY salary DESC;
Selecting name and salary shows the requested columns.
Fill all three blanks to create a query that shows department, average salary, and number of employees, only for departments with more than 5 employees.
SELECT [1], AVG([2]), COUNT([3]) FROM employees GROUP BY [1] HAVING COUNT([3]) > 5;
This query groups by department, calculates average salary, counts employees, and filters groups with more than 5 employees.