Your first sub SELECT has this code:
w2.[Units], w2.[Units1], w2.[Y+2], d.[Units]
which will return two different columns with the name "Units". Duplicate column names are not allowed in a table.
Your first sub SELECT has this code:
w2.[Units], w2.[Units1], w2.[Y+2], d.[Units]
which will return two different columns with the name "Units". Duplicate column names are not allowed in a table.