select t.name,sum(t.SupplierCount) from (
select a.name,count(b.Supplier_Id) as SupplierCount
from yxs_administrators a,yxs_drugsbase_supplier b ,yxs_product c,yxs_supplies d,yxs_drugsbase e
where b.bstop=0  and a.adminid=b.editer and c.Supplier_Id=b.Supplier_Id and b.supplies_id=d.supplies_id and b.drugsbase_id=e.drugsbase_id
and b.agent_price=0
group by a.name
UNION all
select a.name,count(b.Supplier_Id) as SupplierCount
from yxs_administrators a,yxs_drugsbase_supplier b ,yxs_product c,yxs_supplies d,yxs_drugsbase e
where b.bstop=0  and a.adminid=b.editer and c.Supplier_Id=b.Supplier_Id and b.supplies_id=d.supplies_id and b.drugsbase_id=e.drugsbase_id
and suggested_price=0
group by a.name
) t
group by t.name

相关文章:

  • 2021-06-01
  • 2021-06-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
  • 2021-05-01
猜你喜欢
  • 2021-06-13
  • 2022-01-15
  • 2021-12-14
  • 2022-01-02
  • 2022-03-03
  • 2022-12-23
  • 2021-09-13
相关资源
相似解决方案