COUNT(*) vs COUNT(column)
Easy
NULL Handling
Return the total number of employees and the number of employees that have a manager, as total_employees and employees_with_manager.
Table schema
Employees(id INT PRIMARY KEY, name VARCHAR(50), manager_id INT NULL)Sample data
id | name | manager_id
1 | CEO | NULL
2 | VP | 1
3 | Dev | 1
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.