Select Movie_Title , cast(replace(Box_Office_Revenue_,'$','') as signed) movieCol
From sales.google_movie_data movie
Join (Select round(avg(replace(Box_Office_Revenue_,"$","")),2) as col
from sales.google_movie_data) avg_col
On movie.movieCol > avg_col.col;
Error: Unknown column 'movie.movieCol' in 'on clause'
Why am I getting error here and how to resolve it?
Using MySQL