I am getting an error with the below code, apologies this is probably a very simplistic question but i am really nor understanding why it is not working.
I am getting a "Line 9, Column 1 Incorrect Syntax near 'from'" error.
select distinct
b.Identifier,
(b.Low+ b.High) / 2 as bAverage,
m.Average as mAverage,
coalesce(
case when mAverage not null then ((((b.Low + b.High) / 2) + m.Average) / 2) else null end,
case when mAverage is null then ((b.Low + b.High) / 2)) end as TotalAvg,
(b.Volume + m.Qty) as TotalVolume
from table_b_data b
full outer join table_m_data m on b.Identifier=m.Identifier