v_v_hact.frm 2.4 KB

123456789101112131415
  1. TYPE=VIEW
  2. 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`
  3. md5=dbe87c8084e7c753853bc0d3132557ac
  4. updatable=0
  5. algorithm=0
  6. definer_user=root
  7. definer_host=localhost
  8. suid=1
  9. with_check_option=0
  10. timestamp=2022-12-14 10:07:39
  11. create-version=1
  12. 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`
  13. client_cs_name=utf8
  14. connection_cl_name=utf8_general_ci
  15. 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`