Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 question regarding getting maximum from enlisted counts

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-08-31 : 09:51:29
Abhijeet writes "Sir,

i have one SQL Query:

Select month(orderdate),count(orderid)
From orders
Where Year(orderdate) = 1997
Group By month(orderdate)

this query will give the monthno and count of the month for the year 1997

Now i want to get the month having maximum count of the year 1997

how can i get it without using Top ?
"
   

- Advertisement -