select row_number() over (),
       mp.code,
       mp.order_no,
       mp.stove_no,
       eq.area,
       eq.area1,
       mp.product_no,
       mp.product_name,
       mp.weight,
       mp.length,
       mp.update_time outtime,
       TIMESTAMPDIFF(HOUR,mp.update_time,now())
from mes_sync.mes_production mp
left join reportdata.equipment eq on (mp.stove_no = eq.eqpid)
where is_transport = 0
and code not in
(
'YN342A002113N',
'YN341A086121N',
'YN341A086122N',
'YN341A086123N',
'YN341A086124N',
'YN341A086125W',
'YN341A009133W',
'YD352W679141W',
'YN351A074255W',
'YN351B125252N',
'YN351A004243N',
'YN351A031246N',
'YN351B120221W',
'YN351B125253W',
'YN351A004244N',
'YN351A094234W',
'YN351C208253N',
'YN351B135452N',
'YN351C191451W',
'YN351B113353W',
'YN361E317143W',
'YN361D245143WYL',
'YN362W674134N',
'YN362F450144N',
'YN362D274233N',
'YN372C200112N',
'YN372A040112N',
'YN362W679252W',
'YN362H566355N',
'YN371A048152N',
'YN372A042154N',
'YN371A044232N',
'YN372W685201W',
'YN372B155241W',
'YN372G537261N',
'YN372C236153N',
'YN372H633151N'
)
order by outtime;







