Rarely do you need select from a select statement. Occasionally this pops up with complex PIVOTs and UNPIVOTs. The tip when doing this is (in MSSQL) is the "table" select statement needs to be aliased. For example, the following statement will not work: SELECT * FROM ( SELECT * FROM blah ) However, the following statement will work: SELECT * FROM ( SELECT * FROM blah ) x