Skip to main content
SQL โ€ข LESSON 62

COUNT Column

How can we count employees with a known manager?

Intermediateโฑ 3 Minutesโญ 750 XP
๐Ÿค” THE QUESTION

How can we count employees with a known manager?

๐Ÿ’ก WHAT IS IT?

COUNT(column_name) counts only the non-NULL occurrences within the specified column.

๐ŸŽฏ WHAT IS IT USED FOR?

Measuring data completeness, counting assigned accounts, tracking optional field presence.

๐Ÿ’ป EXAMPLE
SELECT COUNT(manager_id) AS employees_with_manager
FROM employees;

๐ŸŽฏ Mission Objectives

Practice typing production-grade SQL code for COUNT Column.

  • โœ“ COUNT(column)
  • โœ“ NULL exclusion
  • โœ“ Non-null count
  • โœ“ Data completeness