I recently answered this question how-to-call-user-defined-function-in-order-to-use-with-select-group-by-order-by
My answer was to use an inline view to perform the
I think another term (possibly a SQL Server term) is 'derived table'
For instance, this article:
http://www.mssqltips.com/tip.asp?tip=1042
or
http://www.sqlteam.com/article/using-derived-tables-to-calculate-aggregate-values