least value in count
Posted
by
Nyfer
on Stack Overflow
See other posts from Stack Overflow
or by Nyfer
Published on 2012-11-26T04:56:44Z
Indexed on
2012/11/26
5:03 UTC
Read the original article
Hit count: 134
i have a table employee(id,dept_id,salary,hire_date,job_id) . the following query i have to execute.
Show all the employee who were hired on the day of the week on which least no of employee were hired.
i have done the query, but am not able to get the least. please check if am correct.
select id, WEEKDAY(hire_date)+1 as days,count(WEEKDAY(hire_date)+1) as count
from test.employee group by days
© Stack Overflow or respective owner