Skip to content

Tag: common-table-expression

How to go convert to CTE

I am a little confused out a CTE works. I need to convert my statement from a rollup with a UNION to a CTE… but the CTE is a bit confusing me. Any Ideas how to approach this? Answer You can express this using a CTE as: