Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximum of count(*)

Status
Not open for further replies.

Raparla

IS-IT--Management
Aug 7, 2000
9
US
Hi,

Any idea on how to find, in which month the maximum number of employees joined the company.

Table has two fields Month, Emp_Id

You can use the following as prototype.

select Month_Name, max(count(Emp_Id)) from Table1
group by Month_Name
 
I would try something like

SELECT top 1 month,COUNT(emp_id) FROM table1
GROUP BY month
order by 2 desc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top