select mrb_owner_dept, mrb_owner_section, sum(m1), sum(m2), count(*) from (
select m.fab,m.mrb_owner_dept,m.mrb_owner_section,
(
select count(*) from f_confirm_action_detail d where d.basicinfo_id = m.basicinfo_id
and d.status = 'CLOSE'
) m1,
(
select count(*) from f_confirm_action_detail d where d.basicinfo_id = m.basicinfo_id
) m2
from f_mrb_request m
) group by mrb_owner_dept, mrb_owner_section;
莱维是谁?代码的质量要看需求。从格式上说,也说得过去。
什么情况? who is 莱维