What you're looking at is known as a Common Table Expression (CTE).
For use of CTEs in Oracle, see http://www.morganslibrary.org/reference/with.html
For use of CTEs in Microsoft SQL Server, see: http://msdn.microsoft.com/en-us/library/ms175972.aspx