Does anyone have any experience writing User Defined Aggregates for SQL Server that call IMSL .NET routines? A simple use case would be calling the IMSL .NET Summary class to get statistics like the median, rather than having to write your own functions in SQL.

There is a nice overview of using C# for SQL Server aggregates here