The column 'Units' was specified multiple times for w3

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.

1 Like