QuestionQ43

Data analysis

A data analyst is asked for the current employee head count and executes this SQL statement:

SELECT COUNT(EMPLOYEE_ID)  
FROM JOBS  

The resulting head count is higher than anticipated because employees may hold multiple jobs. Which of the following should return an accurate employee head count?

Explanation

COUNT(DISTINCT EMPLOYEE_ID) counts every unique employee identifier once, preventing employees with multiple job records from being counted multiple times.

Community Discussion

No comments yet. Be the first to start the discussion!