create table self_check_new_rules (
job_name varchar(100),
rule_id int primary key auto_increment,
rule_name varchar(200),
db_type varchar(100),
db_name varchar(100),
table_name varchar(100),
definition varchar(100),
where_condition varchar(100),
group_by varchar(100),
compare varchar(50),
op varchar(10),
range_min double,
range_max double
)
# view
select `r`.`job_name` AS `job_name`,`r`.`rule_id` AS `rule_id`,`r`.`rule_name` AS `rule_name`,`m`.`db_type` AS `db_type`,`m`.`db_name` AS `db_name`,`m`.`table_name` AS `table_name`,`m`.`definition` AS `definition`,`m`.`where_condition` AS `where_condition`,`m`.`group_by` AS `group_by`,`m`.`compare` AS `compare`,`r`.`op` AS `op`,`r`.`range_min` AS `range_min`,`r`.`range_max` AS `range_max` from (`self_check_metric` `m` join `self_check_rule` `r` on((`r`.`left_metric_name` = `m`.`metric_name`))) where (left(`m`.`metric_name`,6) = 'yester')
任务自检相关表