You work as a Database Administrator for Domain.com. The company uses MySQL as its
database. You have created a table named Employees and want to retrieve the days of the week
on which more than 7 members were hired, as well as the exact number of employees hired on
those days.
Which of the following queries will you execute to accomplish the task?
A.
SELECT TO_CHAR(Emp_hire_date, ‘day’) Emp_hire_day, COUNT(*)
FROM EMPLOYEES
GROUP BY TO_CHAR(Emp_hire_date, ‘day’)
ORDER BY COUNT(*) >7;
B.
SELECT TO_CHAR(Emp_hire_date, ‘day’) Emp_hire_day, COUNT(*)
FROM EMPLOYEES
GROUP BY TO_CHAR(Emp_hire_date, ‘day’)
HAVING COUNT(*) >7;
C.
SELECT TO_CHAR(Emp_hire_date, ‘day’) Emp_hire_day, COUNT(*)
FROM EMPLOYEES
GROUP BY TO_CHAR(Emp_hire_date, ‘day’)
& COUNT(*) >7;
D.
SELECT TO_CHAR(Emp_hire_date, ‘day’) Emp_hire_day, COUNT(*)
FROM EMPLOYEES
GROUP BY TO_CHAR(Emp_hire_date, ‘day’)
WHERE COUNT(*) >7;