Don't have Telegram yet? Try it now!
http://www.macaalay.com/2010/10/13/median-calculation-using-tsql-no-cursors/
Median Calculation using TSQL (no cursors)