Have you ever wanted to reuse an ALIAS in a MSSQL SELECT clause, but found no easy help online. I believe this simple example will allow you to do this and explain CTE in the easiest way possible.
Using a CTE WITH clause allows you to create one selection to create aliases and then use those aliases in a second select statement to do additional calculations.
This is an alternative to using a temp table in some scenarios.