script/检查作业成功率/tools/selectall.txt

1 line
4.6 KiB
Plaintext
Raw Normal View History

2023-12-15 03:26:02 +00:00
select 1-(tb1.num/tb2.num2) from (select num from (select operdesc,sum(n2)as num from ( select operdesc,count(*) as n2 from tbl_jobhistory where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202311 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202309 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202307 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202304 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202301 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202306 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202303 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202310 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202308 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202305 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202302 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc) a group by a.operdesc) t1 where operdesc like '%失败%') as tb1 right JOIN (select sum(num) as num2 from (select operdesc,sum(n2) as num from ( select operdesc,count(*) as n2 from tbl_jobhistory where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202311 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202309 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202307 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202304 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202301 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202306 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202303 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL select operdesc,count(*) as n2 from tbl_jobhistory_202310 where policyname='长期任务-mysql物理多通道' and compid='811da1a9258bb690d58aaef5aa958027' group by operdesc UNION ALL