Complete the code to count all rows in the table named 'employees'.
SELECT COUNT([1]) FROM employees;The COUNT(*) counts all rows, including those with NULLs in any column.
Complete the code to count only the non-NULL values in the 'salary' column from 'employees'.
SELECT COUNT([1]) FROM employees;COUNT(column_name) counts only rows where the column is NOT NULL.
Fix the error in the code to count distinct non-NULL 'department' values in 'employees'.
SELECT COUNT([1]) FROM employees;Use COUNT(DISTINCT column) to count unique non-NULL values.
Fill both blanks to count how many employees have a non-NULL 'email' and a salary greater than 50000.
SELECT COUNT([1]) FROM employees WHERE [2] > 50000;
COUNT(email) counts non-NULL emails. The WHERE clause filters salaries greater than 50000.
Fill all three blanks to count distinct non-NULL 'manager_id' values for employees with 'status' = 'active'.
SELECT COUNT([1]) FROM employees WHERE [2] = [3];
COUNT(DISTINCT manager_id) counts unique non-NULL managers. The WHERE clause filters active employees.