• Question which seems easy according to me.

    After the previous question about CTE , I have (re)studied CTE.

    For the names of the columns in the display , I am preferring aliases (?) defined in the queries ( thru AS ) as often it is more pleasant to read in an application ( titles of the columns are easier to understand especially for non specialist users of SQL Server ) or if I am using a DataTable in my application , I am filling the Caption property of the DataColumn with an expression clearer to understand than the name of the column. An habit not always appreciated by products managers but usually , the "lambda" user appreciates as often I let him to choose the caption of the column. But I have usually worked in small companies which appreciated this way.