Skip to main content
SQL • LESSON 61

COUNT

How can we count the number of employees?

Intermediate3 Minutes740 XP
🤔 THE QUESTION

How can we count the number of employees?

💡 WHAT IS IT?

COUNT(*) computes the total number of rows matching the query criteria, including rows with NULL values.

🎯 WHAT IS IT USED FOR?

Record counting, volume estimation, data sanity checks, total employee rosters.

💻 EXAMPLE
SELECT COUNT(*) AS employee_count
FROM employees;

🎯 Mission Objectives

Practice typing production-grade SQL code for COUNT.

  • COUNT(*)
  • Aggregate functions
  • Total row count
  • Aliasing results