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 2005 Forums
 Transact-SQL (2005)
 Order Agents according to Enrollment

Author  Topic 

lols
Posting Yak Master

174 Posts

Posted - 2009-03-21 : 01:55:20
I have an Enrollment Table

EnrollmentID
AgentID
EnrollmentDate

I want to list how many Agents did how many Enrollments using the rankfunction in SQL Server. How to do?

Output will be :


Position AgentId CountEnroll
1 62 29
2 55 22
3 34 19


Thanks.

   

- Advertisement -