I use on my mysql 8.0 database a table reference:
update station_temp_data a
set min_temp = (select min_temp from
( select min(air_temp) as min_temp
from station_temp_data b
where b.station_id = a.station_id
and DATE_FORMAT(b.mdate, "%Y.%m.%d") = DATE_FORMAT(a.mdate, "%Y.%m.%d")) as Q1)
This work fine on mysql 8.0 but not on 5.5!
I get on 5.5 the error:
Error : Unknown column 'a.station_id' in 'where clause'
How can I downgrade this SQL to the 5.5 version?