Changes between Version 6 and Version 9 of Ticket #1207
- Timestamp:
- Jan 15, 2024, 6:12:15 PM (10 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #1207 – Description
v6 v9 14 14 (select products.serial, history.uid, history.date, hist1.total from history inner join 15 15 (select uid, count(uid) as total from history where ((`history`.type_write = 'mismatch' and (`history`.`status` is null or `history`.`status` = 'fail')) 16 or (`history`.type_write = 'mismatch' and `history`.`status` = 'ok' and (`history`.bond is null or `history`.bond = ''))) and comment is not null and comment != '' group by uid) as hist1 on history.uid = hist1.uid16 or (`history`.type_write = 'mismatch' and `history`.`status` = 'ok' and `history`.bond is null)) and comment is not null and comment != '' group by uid) as hist1 on history.uid = hist1.uid 17 17 inner join products on products.uid = history.uid where (products.name like searchName 18 18 and products.serial like searchSerial and history.comment like searchComment) and (history.uid, history.date) in 19 19 (select uid, max(date) from history where ((`history`.type_write = 'mismatch' and (`history`.`status` is null or `history`.`status` = 'fail')) 20 or (`history`.type_write = 'mismatch' and `history`.`status` = 'ok' and (`history`.bond is null or `history`.bond = ''))) and history.comment like searchComment and comment is not null and comment != '' group by uid )20 or (`history`.type_write = 'mismatch' and `history`.`status` = 'ok' and `history`.bond is null)) and history.comment like searchComment and comment is not null and comment != '' group by uid ) 21 21 group by products.serial, history.uid, history.date, hist1.total order by history.date desc) as hist2 22 22 where (@mintotal := @minTotal + total)) as hust2 where hust2.mintotal > min and hust2.prevtotal < max;