TYPE=VIEW query=select `e1`.`varcowcode` AS `varcowcode`,round(timestampdiff(HOUR,substring_index(group_concat(`e1`.`actdatetime` order by `e1`.`actdatetime` DESC separator \',\'),\',\',1),now()),0) AS `afterwarn`,substring_index(group_concat(`e1`.`actdatetime` order by `e1`.`actdatetime` DESC separator \',\'),\',\',1) AS `datetime`,if((substring_index(group_concat(`e1`.`second_filter` order by `e1`.`actdatetime` DESC separator \',\'),\',\',1) = 1),1,substring_index(group_concat(`e1`.`actlevel` order by `e1`.`actdatetime` DESC separator \',\'),\',\',1)) AS `actlevel` from `heatwatch`.`estrusact` `e1` where (((to_days(curdate()) - to_days(`e1`.`actdatetime`)) < 2) and (`e1`.`result` = 0) and (ifnull(`e1`.`falsedel`,0) = 0)) group by `e1`.`varcowcode` md5=dbe87c8084e7c753853bc0d3132557ac updatable=0 algorithm=0 definer_user=root definer_host=localhost suid=1 with_check_option=0 timestamp=2022-12-14 10:07:39 create-version=1 source=select `e1`.`varcowcode` AS `varcowcode`,round(timestampdiff(HOUR,substring_index(group_concat(`e1`.`actdatetime` order by `e1`.`actdatetime` DESC separator \',\'),\',\',1),current_timestamp()),0) AS `afterwarn`,substring_index(group_concat(`e1`.`actdatetime` order by `e1`.`actdatetime` DESC separator \',\'),\',\',1) AS `datetime`,if(substring_index(group_concat(`e1`.`second_filter` order by `e1`.`actdatetime` DESC separator \',\'),\',\',1) = 1,1,substring_index(group_concat(`e1`.`actlevel` order by `e1`.`actdatetime` DESC separator \',\'),\',\',1)) AS `actlevel` from `estrusact` `e1` where to_days(curdate()) - to_days(`e1`.`actdatetime`) < 2 and `e1`.`result` = 0 and ifnull(`e1`.`falsedel`,0) = 0 group by `e1`.`varcowcode` client_cs_name=utf8 connection_cl_name=utf8_general_ci view_body_utf8=select `e1`.`varcowcode` AS `varcowcode`,round(timestampdiff(HOUR,substring_index(group_concat(`e1`.`actdatetime` order by `e1`.`actdatetime` DESC separator \',\'),\',\',1),now()),0) AS `afterwarn`,substring_index(group_concat(`e1`.`actdatetime` order by `e1`.`actdatetime` DESC separator \',\'),\',\',1) AS `datetime`,if((substring_index(group_concat(`e1`.`second_filter` order by `e1`.`actdatetime` DESC separator \',\'),\',\',1) = 1),1,substring_index(group_concat(`e1`.`actlevel` order by `e1`.`actdatetime` DESC separator \',\'),\',\',1)) AS `actlevel` from `heatwatch`.`estrusact` `e1` where (((to_days(curdate()) - to_days(`e1`.`actdatetime`)) < 2) and (`e1`.`result` = 0) and (ifnull(`e1`.`falsedel`,0) = 0)) group by `e1`.`varcowcode`