Did you mean to use lower case L instead of the digit 1 as the table alias? Change to one of these--compare the results
SELECT [1].wait_type,
([1].wait_time_ms - O.wait_time_s) accum_wait_ms --red squigly line under wait_time_ms on this line
FROM #OriginalWaitSnapshot O
INNER JOIN #LatestWaitStatSnapshot [1] ON
O.wait_type = [1].wait_type
WHERE [1].wait_type_ms > O.wait_time_ms
ORDER BY [1].wait_time_ms DESC
Or,--compare the results
SELECT x.wait_type,
(x.wait_time_ms - O.wait_time_s) accum_wait_ms --red squigly line under wait_time_ms on this line
FROM #OriginalWaitSnapshot O
INNER JOIN #LatestWaitStatSnapshot x
ON O.wait_type = x.wait_type
WHERE x.wait_type_ms > O.wait_time_ms
ORDER BY
x.wait_time_ms DESC