Q3: Find employees who do not have a manager assigned.
In this query, we want to find employees who do not have a manager assigned.
We select all columns from the employees table and use:
WHERE manager_id IS NULL
Notice that we don’t use manager_id = NULL.
SELECT * FROM employees WHERE manager_id IS NULL;

In SQL, NULL represents a missing or unknown value, so we use the special operators IS NULL or IS NOT NULL to check for it.
In our result, we get 12 employees whose manager_id is NULL.
These are the top-level employees in our sample data, such as James Anderson, the Engineering Manager, Emily Davis, the Sales Manager, and Robert Moore, the Finance Manager.
The other employees have a manager_id that points to another employee.
So remember: whenever you need to find missing values in SQL, use IS NULL.
And when you want to find records where a value exists, use IS NOT NULL.