select 表1.企业类别,count(*) as 企业数量,sum(表2.员工数) as 员工数,sum(表3.出国人数) as 出国人数 from 表1, 表2, 表3 where 表1.企业名称 = 表1.企业名称 and 表1.企业名称 = 表3.企业名称 group by 表1.企业类别 order by 1
select 表1.ent_type as 企业类别,count(表1.ent_name) as 企业数量,sum(表2.ent_person) as 员工数,sum(表3.ent_chuguo) as 出国人数from 表1,表2,表3where 表1.ent_name=表2.ent_name and 表2.ent_name=表3.ent_namegroup by ent_type