nerdexam
CompTIA

DA0-002 · Question #95

A data analyst receives a request for the current employee head count and runs the following SQL statement: SELECT COUNT(EMPLOYEE_ID) FROM JOBS The returned head count is higher than expected because

Sign in or unlock DA0-002 to reveal the answer and full explanation for question #95. The question stem and answer options stay visible for context.

Data Acquisition and Preparation

Question

A data analyst receives a request for the current employee head count and runs the following SQL statement:

SELECT COUNT(EMPLOYEE_ID) FROM JOBS The returned head count is higher than expected because employees can have multiple jobs. Which of the following should return an accurate employee head count?

Options

  • ASELECT JOB_TYPE, COUNT DISTINCT(EMPLOYEE_ID) FROM JOBS
  • BSELECT DISTINCT COUNT(EMPLOYEE_ID) FROM JOBS
  • CSELECT JOB_TYPE, COUNT(DISTINCT EMPLOYEE_ID) FROM JOBS
  • DSELECT COUNT(DISTINCT EMPLOYEE_ID) FROM JOBS

Unlock DA0-002 to see the answer

You've previewed enough free DA0-002 questions. Unlock DA0-002 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#SQL#COUNT function#DISTINCT keyword#Data querying
Full DA0-002 Practice