Record events if values have changed in the last 3 days
问题 I have a question, I have a table of importance. But the difference between these values is 3 days. select er.name, er.temp as real_temp, der.temp as old_temp from TEMPR_SILO er left join TEMPR_SILO der on er.name = der.name where der.ID_TRANS in (select max(ID_TRANS) - 72 from TEMPR_SILO) and er.ID_TRANS in (select max(ID_TRANS) from TEMPR_SILO) My answer NAME REAL_TEMP OLD_TEMP SENSOR0001 7.98 9.66 SENSOR0002 8.04 9.91 SENSOR0003 7.91 0.41 SENSOR0004 9.54 -0.27 SENSOR0005 9.85 -1.09