select l.*
,(select new_status
from change_log ch
where ch.id=l.id
and ch.date<=l.date_message
order by ch.date desc
limit 1) as state
from List l
select l.*
,(select new_status
from change_log ch
where ch.id=l.id
and ch.date=(select max(ch.date)
from change_log ch
where ch.date<=l.date_message)
) as state
from List l