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.
| Author |
Topic |
|
shashwat2691
Starting Member
11 Posts |
Posted - 2011-03-11 : 17:29:30
|
| Suppost my table is as followsIncoming {ACN, Date, Amount}Now, I want to know the account number of a record who has maximum ACN count in this table.Shashwat Tripathi - INDIA |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-03-11 : 17:34:09
|
| SELECT TOP 1 ACN FROM Incoming GROUP BY ACN ORDER BY COUNT(*) DESC |
 |
|
|
shashwat2691
Starting Member
11 Posts |
Posted - 2011-03-11 : 17:39:12
|
| Thanks a lot robvolk, You are brilliant......Shashwat Tripathi - INDIA |
 |
|
|
|
|
|