表1:SELECT 'GDP',A.* FROM
(
select count(ent.EntID) QSNUM,SUM(TotalMember) TotalMember,SUM(OrignateFund) OrignateFund,SUM(RegisterFund) RegisterFund from entinfo ent
UNION ALL
select count(ent.EntID) QSNUM,SUM(TotalMember) TotalMember,SUM(OrignateFund) OrignateFund,SUM(RegisterFund) RegisterFund from entinfo ent WHERE ENT.INDID IN(1,2,3,4,5,6,7,8,9,10,11,12,13)
UNION ALL
select count(ent.EntID) QSNUM,SUM(TotalMember) TotalMember,SUM(OrignateFund) OrignateFund,SUM(RegisterFund) RegisterFund from entinfo ent WHERE ENT.INDID IN(1,2)
UNION ALL
select count(ent.EntID) QSNUM,SUM(TotalMember) TotalMember,SUM(OrignateFund) OrignateFund,SUM(RegisterFund) RegisterFund from entinfo ent WHERE ENT.INDID NOT IN(1,2)) A
表2:select 'GDP增加值' GDP,count(ent.entid) qynum,ind.indname,sum(ent.TotalMember) TotalNumber,sum(OrignateFund) OrignateFund,
sum(RegisterFund) RegisterFund from entinfo ent,inds ind where ent.indid=ind.indid
group by ind.indname
表3:总表--select ent.entname entname,ent.ChainNum chainnum,ent.TotalMember TotalMember,ent.OrignateFund OrignateFund
,ent.RegisterFund RegisterFund,ed_y.WorkFee WorkFee,ed_y.MainTax+ed_y.MainProfit taxprofit
from entinfo ent,EntData_Y ed_y where ent.entid=ed_y.entid(+) and ent.IsChain='1'
分表--
select ind.indname indname,sum(ent.ChainNum) chainnum,sum(ent.TotalMember) TotalMember,sum(ent.OrignateFund) OrignateFund
,sum(ent.RegisterFund) RegisterFund,sum(ed_y.WorkFee) WorkFee,sum(ed_y.MainTax+ed_y.MainProfit) taxprofit
from entinfo ent,EntData_Y ed_y,inds ind where ent.entid=ed_y.entid(+)
and ent.indid=ind.indid and ent.IsChain='1' group by ind.indname
select adm.admname admname,sum(ent.ChainNum) chainnum,sum(ent.TotalMember) TotalMember,sum(ent.OrignateFund) OrignateFund
,sum(ent.RegisterFund) RegisterFund,sum(ed_y.WorkFee) WorkFee,sum(ed_y.MainTax+ed_y.MainProfit) taxprofit
from entinfo ent,EntData_Y ed_y,adms adm where ent.entid=ed_y.entid(+)
and adm.admid=ent.admid and ent.IsChain='1' group by adm.admname
表四:select a.*,a.BqBizMoney/b.AllBizMoney BZBizMoney from
(select count(ent.entid) endnum,sum(ent.ChainNum) ChainNum,sum(ent.RegisterArea) RegisterArea
,sum(ent.OrignateFund) OrignateFund,sum(ent.RegisterFund) RegisterFund,sum(ent.TotalMember) TotalMember
,sum(ed_q.BizMoney) BqBizMoney from entinfo ent,EntData_Q ed_q where ent.entid=ed_q.entid and 1=1) a,
(select sum(ed_q.BizMoney) AllBizMoney from entinfo ent,EntData_Q ed_q where ent.entid=ed_q.entid) b
表六:
select count(ent.entid) endnum,sum(ent.ChainNum) ChainNum,sum(ent.RegisterArea) RegisterArea
,sum(ed_q.BizMoney) BqBizMoney,sum(ent.OrignateFund) OrignateFund,sum(ent.RegisterFund) RegisterFund,sum(ent.TotalMember) TotalMember
,sum(DesignPower) DesignPower,sum(XY_WaterTon) XY_WaterTon,sum(XY_SwabCount) XY_SwabCount
,sum(XY_SwabPrice*XY_SwabCount) YearNum from entinfo ent,EntData_Q ed_q,EntData_M_XY ed_xy where ent.entid=ed_q.entid and ed_xy.entid=ent.entid and 1=1
表七:
select * from (
select adm.admname,adm.admid,ind.indname,count(ent.entid) entnum from entinfo ent,adms adm,inds ind
where ent.indid = ind.indid and ent.admid=adm.admid and ent.indid in(select indid from inds)
group by adm.admname,ind.indname,adm.admid ) order by admid
表8:select eco.econame,count(ent.Website) webnumber, sum(ent.RegisterArea) RegisterArea, sum(ent.TotalMember) TotalMember,
sum(ent.OrignateFund) OrignateFund, sum(ent.RegisterFund) RegisterFund, sum(entm.BizMoney) BizMoney, sum(entm.TaxMoney) TaxMoney from EntInfo ent, EntData_M entm, Ecos eco
where ent.EntID=entm.EntID and ent.EcoID=eco.EcoID group by eco.econame
分表:
select ind.indname,count(ent.Website) webnumber, sum(ent.RegisterArea) RegisterArea, sum(ent.TotalMember) TotalMember,
sum(ent.OrignateFund) OrignateFund, sum(ent.RegisterFund) RegisterFund, sum(entm.BizMoney) BizMoney, sum(entm.TaxMoney) TaxMoney
from EntInfo ent, EntData_M entm, inds ind
where ent.EntID=entm.EntID and ent.EcoID=ind.indid group by ind.indname
表11:select ind.IndName, ent.EntName, count(ent.Website) webnumber,
ent.TotalMember,ent.OrignateFund, ent.RegisterFund,entm.BizMoney,
entm.TaxMoney from EntInfo ent,Inds ind, EntData_M entm
where ent.IndID= ind.IndID and ent.EntID=entm.EntID and ent.IsFamous=1
group by ind.IndName, ent.EntName,
ent.TotalMember,ent.OrignateFund, ent.RegisterFund,entm.BizMoney,
entm.TaxMoney
表12: select ind.IndName, ent.EntName, ent.ChainNum, ent.TotalMember, ent.OrignateFund,
ent.RegisterFund, entm.BizMoney, entm.TaxMoney from EntInfo ent, Inds ind,
EntData_M entm where ent.IndID=ind.IndID and ent.EntID=entm.EntID and ent.IsChain=1
表13:
1----select * from (select count(ent.EntID) entnumber from EntInfo ent where ent.indid='13') a,
(select sum(ent.FZJGNUM) FZJGNUM from EntInfo ent where ent.indid='13') b,
(select sum(FZJGNUM) from EntInfo ent where ent.indid='13') c,
(select count(ISZLTSRZ) ZLTSRZNUM from entinfo ent where ent.indid='13' and ISZLTSRZ='是') d,
(select count(ISZHTSXY) ZHTSXYNUM from entinfo ent where ent.indid='13' and ISZHTSXY='是') e,
(select count(ent.EntID) ent_Anumber from EntInfo ent where ent.indid='13' and ent.levid='1') f,
(select count(ent.EntID) ent_Bnumber from EntInfo ent where ent.indid='13' and ent.levid='2') g,
(select count(ent.EntID) ent_Cnumber from EntInfo ent where ent.indid='13' and ent.levid='3') h,
(select sum(ent.TotalMember) TotalMember,sum(ent.CultNum5) SSNUM,sum(ent.CultNum5+ent.CultNum4) DBNUM
,sum(ent.CultNum5+ent.CultNum4+ent.CultNum3) DZNUM,sum(ent.TotalMember-ent.OutsMember) BSNUM
,sum(ent.OutsMember) WSNUM from EntInfo ent where ent.indid='13') i
2----select * from
(
select sum(DD_BiznessMoney) ThisDD_BiznessMoney,sum(TaxMoney) ThisTaxMoney,sum(ThisProfit+ThatProfit) ThisProfit
from entdata_q q,entdata_q_dd dd where q.entid in (select entid from entinfo ent where ent.indid='13') and q.reportid=dd.reportid and to_char(q.reportdate,'yyyy')= to_char(sysdate,'yyyy')
union all
select sum(DD_BiznessMoney) ThatDD_BiznessMoney,sum(TaxMoney) ThatTaxMoney,sum(ThisProfit+ThatProfit) ThatProfit
from entdata_q q,entdata_q_dd dd where q.entid in (select entid from entinfo ent where ent.indid='13') and q.reportid=dd.reportid and to_char(q.reportdate,'yyyy')= (to_char(sysdate,'yyyy') - 1))
3----
select * from
(select
count(ent.OrignateFund) OrignateFund1,
sum(dd.DD_BiznessMoney) DD_BiznessMoneyNum1,
sum(dd.DD_EnterpriceAmount+dd.DD_IndividualAmount) Amount1,
sum(dd.DD_EnterpriceAmount) DD_EnterpriceAmount1,
sum(dd.DD_IndividualAmount) DD_IndividualAmount1,
sum(dd.DD_GiveupAmount) DD_GiveupAmount1
from entinfo ent,entdata_q q,entdata_q_dd dd,adms adm where ent.admid=adm.admid and ent.entid=q.entid and q.reportid=dd.reportid
and adm.admid in(1,2,3,4,5,6,7,8) and ent.indid='13'
union all
select
count(ent.OrignateFund) OrignateFund2,
sum(dd.DD_BiznessMoney) DD_BiznessMoneyNum3,
sum(dd.DD_EnterpriceAmount+dd.DD_IndividualAmount) Amount3,
sum(dd.DD_EnterpriceAmount) DD_EnterpriceAmount3,
sum(dd.DD_IndividualAmount) DD_IndividualAmount3,
sum(dd.DD_GiveupAmount) DD_GiveupAmount2
from entinfo ent,entdata_q q,entdata_q_dd dd,adms adm where ent.admid=adm.admid and ent.entid=q.entid and q.reportid=dd.reportid
and adm.admid not in(1,2,3,4,5,6,7,8) and ent.indid='13') m
表14:
1----select * from (select count(ent.EntID) entnumber from EntInfo ent where ent.indid='12') a,
(select count(ISZLTSRZ) ZLTSRZNUM from entinfo ent where ent.indid='12' and ISZLTSRZ='是') d,
(select count(ISZHTSXY) ZHTSXYNUM from entinfo ent where ent.indid='12' and ISZHTSXY='是') e,
(select count(ent.EntID) ent_Anumber from EntInfo ent where ent.indid='12' and ent.levid='1') f,
(select count(ent.EntID) ent_Bnumber from EntInfo ent where ent.indid='12' and ent.levid='2') g,
(select count(ent.EntID) ent_Cnumber from EntInfo ent where ent.indid='12' and ent.levid='3') h,
(select sum(ent.TotalMember) TotalMember,sum(ent.CultNum5) SSNUM,sum(ent.CultNum5+ent.CultNum4) DBNUM
,sum(ent.CultNum5+ent.CultNum4+ent.CultNum3) DZNUM,sum(ent.TotalMember-ent.OutsMember) BSNUM
,sum(ent.OutsMember) WSNUM from EntInfo ent where ent.indid='12') i
2----
select * from
(
select sum(BizMoney) BizMoney,sum(TaxMoney) TaxMoney,sum(ThisProfit+ThatProfit) ThisProfit
from entdata_q q where q.entid in (select entid from entinfo ent where ent.indid='12') and to_char(q.reportdate,'yyyy')= to_char(sysdate,'yyyy')
union all
select sum(BizMoney) BizMoney,sum(TaxMoney) TaxMoney,sum(ThisProfit+ThatProfit) ThatProfit
from entdata_q q where q.entid in (select entid from entinfo ent where ent.indid='12') and to_char(q.reportdate,'yyyy')= (to_char(sysdate,'yyyy') - 1)
)
3-------
select * from (
select '洁服务' servicename,sum(ZL_Clear_BizMoney) BizMoney,sum(ZL_Clear_RentTimes) RentTimes,
sum(ZL_Clear_Enterprices) Enterprices,sum(ZL_Clear_Individuals) Individuals,sum(ZL_Clear_RentTerm1) RentTerm1
,sum(ZL_Clear_RentTerm2) RentTerm2,sum(ZL_Clear_RentTerm3) RentTerm3 from EntData_Q_ZL
union
select '服装[婚纱、晚礼服]' servicename,sum(ZL_Dress_BizMoney) BizMoney,sum(ZL_Clear_RentTimes) RentTimes,
sum(ZL_Dress_Enterprices) Enterprices,sum(ZL_Dress_Individuals) Individuals,sum(ZL_Dress_RentTerm1) RentTerm1
,sum(ZL_Dress_RentTerm2) RentTerm2,sum(ZL_Dress_RentTerm3) RentTerm3 from EntData_Q_ZL
union
select '儿童用品' servicename,sum(ZL_Enfant_BizMoney) BizMoney,sum(ZL_Enfant_RentTimes) RentTimes,
sum(ZL_Enfant_Enterprices) Enterprices,sum(ZL_Enfant_Individuals) Individuals,sum(ZL_Enfant_RentTerm1) RentTerm1
,sum(ZL_Enfant_RentTerm2) RentTerm2,sum(ZL_Enfant_RentTerm3) RentTerm3 from EntData_Q_ZL
union
select '办公用品' servicename,sum(ZL_Office_BizMoney) BizMoney,sum(ZL_Office_RentTimes) RentTimes,
sum(ZL_Office_Enterprices) Enterprices,sum(ZL_Office_Individuals) Individuals,sum(ZL_Office_RentTerm1) RentTerm1
,sum(ZL_Office_RentTerm2) RentTerm2,sum(ZL_Office_RentTerm3) RentTerm3 from EntData_Q_ZL
union
select '汽车租赁' servicename,sum(ZL_Motor_BizMoney) BizMoney,sum(ZL_Motor_RentTimes) RentTimes,
sum(ZL_Motor_Enterprices) Enterprices,sum(ZL_Motor_Individuals) Individuals,sum(ZL_Motor_RentTerm1) RentTerm1
,sum(ZL_Motor_RentTerm2) RentTerm2,sum(ZL_Motor_RentTerm3) RentTerm3 from EntData_Q_ZL
union
select '工业生产租赁' servicename,sum(ZL_Produce_BizMoney) BizMoney,sum(ZL_Produce_RentTimes) RentTimes,
sum(ZL_Produce_Enterprices) Enterprices,sum(ZL_Produce_Individuals) Individuals,sum(ZL_Produce_RentTerm1) RentTerm1
,sum(ZL_Produce_RentTerm2) RentTerm2,sum(ZL_Produce_RentTerm3) RentTerm3 from EntData_Q_ZL
union
select '大型机械租赁' servicename,sum(ZL_Machine_BizMoney) BizMoney,sum(ZL_Machine_RentTimes) RentTimes,
sum(ZL_Machine_Enterprices) Enterprices,sum(ZL_Machine_Individuals) Individuals,sum(ZL_Machine_RentTerm1) RentTerm1
,sum(ZL_Machine_RentTerm2) RentTerm2,sum(ZL_Machine_RentTerm3) RentTerm3 from EntData_Q_ZL
union
select '铁路机械租赁' servicename,sum(ZL_Railway_BizMoney) BizMoney,sum(ZL_Railway_RentTimes) RentTimes,
sum(ZL_Railway_Enterprices) Enterprices,sum(ZL_Railway_Individuals) Individuals,sum(ZL_Railway_RentTerm1) RentTerm1
,sum(ZL_Railway_RentTerm2) RentTerm2,sum(ZL_Railway_RentTerm3) RentTerm3 from EntData_Q_ZL
union
select '其他' servicename,sum(ZL_Other_BizMoney) BizMoney,sum(ZL_Other_RentTimes) RentTimes,
sum(ZL_Other_Enterprices) Enterprices,sum(ZL_Other_Individuals) Individuals,sum(ZL_Other_RentTerm1) RentTerm1
,sum(ZL_Other_RentTerm2) RentTerm2,sum(ZL_Other_RentTerm3) RentTerm3 from EntData_Q_ZL)
表15:
1----
select * from (select count(ent.EntID) entnumber from EntInfo ent where ent.indid='9') a,
(select count(ent.entid) pmwwnum from entinfo ent,entinfo_pm pm where ent.indid='9' and pm.entid=ent.entid and pm.ispmww='是') b,
(select count(ISZLTSRZ) ZLTSRZNUM from entinfo ent where ent.indid='9' and ISZLTSRZ='是') d,
(select count(ISZHTSXY) ZHTSXYNUM from entinfo ent where ent.indid='9' and ISZHTSXY='是') e,
(select count(ent.EntID) ent_Anumber from EntInfo ent where ent.indid='9' and ent.levid='1') f,
(select count(ent.EntID) ent_Bnumber from EntInfo ent where ent.indid='9' and ent.levid='2') g,
(select count(ent.EntID) ent_Cnumber from EntInfo ent where ent.indid='9' and ent.levid='3') h,
(select sum(ent.TotalMember) TotalMember,sum(pm.PM_Certicate) PM_Certicate,sum(pm.PM_Teacher) PM_Teacher
,sum(pm.PM_House) PM_House,sum(pm.PM_Second) PM_Second
,sum(pm.PM_Other) PM_Other from EntInfo ent,entinfo_pm pm where ent.indid='9' and pm.entid=ent.entid ) i
2----
select * from
(
select sum(pm.PM_BizCount) PM_BizCount,sum(pm.PM_BizMoney) PM_BizMoney,sum(pm.PM_TaxMoney) PM_TaxMoney,sum(pm.PM_ThisProfit + pm.PM_ThatProfit) Profit from entdata_h h ,entdata_h_pm pm where h.reportid=pm.reportid and to_char(h.reportdate,'yyyy')= to_char(sysdate,'yyyy')
union all
select sum(pm.PM_BizCount) PM_BizCount,sum(pm.PM_BizMoney) PM_BizMoney,sum(pm.PM_TaxMoney) PM_TaxMoney,sum(pm.PM_ThisProfit + pm.PM_ThatProfit) Profit from entdata_h h ,entdata_h_pm pm where h.reportid=pm.reportid and to_char(h.reportdate,'yyyy')= (to_char(sysdate,'yyyy') - 1))
3--
select * from (
select '政府部门和金融资产机构委托' pname ,sum(PM_Gov_Realty) PM_Gov_Realty,sum(PM_Gov_Art) PM_Gov_Art,sum(PM_Gov_Rural) PM_Gov_Rural,
sum(PM_Gov_Motor) PM_Gov_Motor,sum(PM_Gov_Property) PM_Gov_Property,sum(PM_Gov_Intange) PM_Gov_Intange,
sum(PM_Gov_Other) PM_Gov_Other from entdata_h_pm pm
union all
select '法院' pname ,sum(PM_Law_Realty) PM_Law_Realty,sum(PM_Law_Art) PM_Law_Art,sum(PM_Law_Rural) PM_Law_Rural,
sum(PM_Law_Motor) PM_Law_Motor,sum(PM_Law_Property) PM_Law_Property,sum(PM_Law_Intange) PM_Law_Intange,
sum(PM_Law_Other) PM_Law_Other from entdata_h_pm pm
union all
select '国土部门' pname ,sum(PM_Land_Realty) PM_Land_Realty,sum(PM_Land_Art) PM_Land_Art,sum(PM_Land_Rural) PM_Land_Rural,
sum(PM_Land_Motor) PM_Land_Motor,sum(PM_Land_Property) PM_Land_Property,sum(PM_Land_Intange) PM_Land_Intange,
sum(PM_Land_Other) PM_Land_Other from entdata_h_pm pm
union all
select '税务' pname ,sum(PM_Tax_Realty) PM_Tax_Realty,sum(PM_Tax_Art) PM_Tax_Art,sum(PM_Tax_Rural) PM_Tax_Rural,
sum(PM_Tax_Motor) PM_Tax_Motor,sum(PM_Tax_Property) PM_Tax_Property,sum(PM_Tax_Intange) PM_Tax_Intange,
sum(PM_Tax_Other) PM_Tax_Other from entdata_h_pm pm
union all
select '海关' pname ,sum(PM_Ciq_Realty) PM_Ciq_Realty,sum(PM_Ciq_Art) PM_Ciq_Art,sum(PM_Ciq_Rural) PM_Ciq_Rural,
sum(PM_Ciq_Motor) PM_Ciq_Motor,sum(PM_Ciq_Property) PM_Ciq_Property,sum(PM_Ciq_Intange) PM_Ciq_Intange,
sum(PM_Ciq_Other) PM_Ciq_Other from entdata_h_pm pm
union all
select '金融资产机构' pname ,sum(PM_Finance_Realty) PM_Finance_Realty,sum(PM_Finance_Art) PM_Finance_Art,sum(PM_Finance_Rural) PM_Finance_Rural,
sum(PM_Finance_Motor) PM_Finance_Motor,sum(PM_Finance_Property) PM_Finance_Property,sum(PM_Finance_Intange) PM_Finance_Intange,
sum(PM_Finance_Other) PM_Finance_Other from entdata_h_pm pm
union all
select '其他机构委托' pname , sum(PM_Other_Realty) PM_Other_Realty,sum(PM_Other_Art) PM_Other_Art,sum(PM_Other_Rural) PM_Other_Rural,
sum(PM_Other_Motor) PM_Other_Motor,sum(PM_Other_Property) PM_Other_Property,sum(PM_Other_Intange) PM_Other_Intange,
sum(PM_Other_Other) PM_Other_Other from entdata_h_pm pm
union all
select '个人委托' pname ,sum(PM_Private_Realty) PM_Other_Realty,sum(PM_Private_Art) PM_Private_Art,sum(PM_Private_Rural) PM_Private_Rural,
sum(PM_Private_Motor) PM_Private_Motor,sum(PM_Private_Property) PM_Private_Property,sum(PM_Private_Intange) PM_Private_Intange,
sum(PM_Private_Other) PM_Private_Other from entdata_h_pm pm
union all
select '公物拍卖企业' pname ,sum(PM_Public_Realty) PM_Public_Realty,sum(PM_Public_Art) PM_Public_Art,sum(PM_Public_Rural) PM_Public_Rural,
sum(PM_Public_Motor) PM_Public_Motor,sum(PM_Public_Property) PM_Public_Property,sum(PM_Public_Intange) PM_Public_Intange,
sum(PM_Public_Other) PM_Public_Other from entdata_h_pm pm)
表16:
1-------
select * from (select count(ent.EntID) entnumber from EntInfo ent where ent.indid='10') a,
(select sum(ent.JHSCNUM) JHSCNUM from EntInfo ent where ent.indid='10') b,
(select sum(JHSDNUM) JHSDNUM from EntInfo ent where ent.indid='10') c,
(select count(ISZLTSRZ) ZLTSRZNUM from entinfo ent where ent.indid='10' and ISZLTSRZ='是') d,
(select count(ISZHTSXY) ZHTSXYNUM from entinfo ent where ent.indid='10' and ISZHTSXY='是') e,
(select count(ent.EntID) ent_Anumber from EntInfo ent where ent.indid='10' and ent.levid='1') f,
(select count(ent.EntID) ent_Bnumber from EntInfo ent where ent.indid='10' and ent.levid='2') g,
(select count(ent.EntID) ent_Cnumber from EntInfo ent where ent.indid='10' and ent.levid='3') h,
(select sum(ent.TotalMember) TotalMember,sum(ent.CultNum5) SSNUM,sum(ent.CultNum5+ent.CultNum4) DBNUM
,sum(ent.CultNum5+ent.CultNum4+ent.CultNum3) DZNUM,sum(ent.TotalMember-ent.OutsMember) BSNUM
,sum(ent.OutsMember) WSNUM from EntInfo ent where ent.indid='10') i
2----
select * from
(
select sum(BizMoney) BizMoney,sum(TaxMoney) TaxMoney,sum(ThisProfit+ThatProfit) ThisProfit
from entdata_q q where q.entid in (select entid from entinfo ent where ent.indid='10') and to_char(q.reportdate,'yyyy')= to_char(sysdate,'yyyy')
union all
select sum(BizMoney) BizMoney,sum(TaxMoney) TaxMoney,sum(ThisProfit+ThatProfit) ThatProfit
from entdata_q q where q.entid in (select entid from entinfo ent where ent.indid='10') and to_char(q.reportdate,'yyyy')= (to_char(sysdate,'yyyy') - 1)
)
3--------
select * from(
select '家电' pname, sum(JH_Electric_BizAmount) JH_Electric_BizAmount,sum(JH_Electric_BizMoney) JH_Electric_BizMoney from entdata_q_jh
union all
select '电脑' pname,sum(JH_Computer_BizAmount) JH_Computer_BizAmount,sum(JH_Computer_BizMoney) JH_Computer_BizMoney from entdata_q_jh
union all
select '冰箱、洗衣机、电视机' pname,sum(JH_Common_BizAmount) JH_Common_BizAmount,sum(JH_Common_BizMoney) JH_Common_BizMoney from entdata_q_jh
union all
select '手机' pname,sum(JH_Mobile_BizAmount) JH_Mobile_BizAmount,sum(JH_Mobile_BizMoney) JH_Mobile_BizMoney from entdata_q_jh
union all
select '旧家具' pname,sum(JH_Fitment_BizAmount) JH_Fitment_BizAmount,sum(JH_Fitment_BizMoney) JH_Fitment_BizMoney from entdata_q_jh
union all
select '古旧家具' pname,sum(JH_History_BizAmount) JH_History_BizAmount,sum(JH_History_BizMoney) JH_History_BizMoney from entdata_q_jh
union all
select '民用家具' pname,sum(JH_People_BizAmount) JH_People_BizAmount,sum(JH_People_BizMoney) JH_People_BizMoney from entdata_q_jh
union all
select '自行车' pname,sum(JH_Bicycle_BizAmount) JH_Bicycle_BizAmount,sum(JH_Bicycle_BizMoney) JH_Bicycle_BizMoney from entdata_q_jh
union all
select '其他' pname,sum(JH_Other_BizAmount) JH_Other_BizAmount,sum(JH_Other_BizMoney) JH_Other_BizMoney from entdata_q_jh
)
表17:
1---select * from (select count(ent.EntID) entnumber from EntInfo ent where ent.indid='11') a,
(select sum(ent.ZSZYSCNUM) ZSZYSCNUM from EntInfo ent where ent.indid='11') b,
(select sum(ZSZYHSNUM) ZSZYHSNUM from EntInfo ent where ent.indid='11') c,
(select count(ISZLTSRZ) ZLTSRZNUM from entinfo ent where ent.indid='11' and ISZLTSRZ='是') d,
(select count(ISZHTSXY) ZHTSXYNUM from entinfo ent where ent.indid='11' and ISZHTSXY='是') e,
(select count(ent.EntID) ent_Anumber from EntInfo ent where ent.indid='11' and ent.levid='1') f,
(select count(ent.EntID) ent_Bnumber from EntInfo ent where ent.indid='11' and ent.levid='2') g,
(select count(ent.EntID) ent_Cnumber from EntInfo ent where ent.indid='11' and ent.levid='3') h,
(select sum(ent.TotalMember) TotalMember,sum(ent.CultNum2 + ent.CultNum1) CZNUM,sum(ent.CultNum5+ent.CultNum4) DBNUM
,sum(ent.CultNum5+ent.CultNum4+ent.CultNum3) DZNUM,sum(ent.TotalMember-ent.OutsMember) BSNUM
,sum(ent.OutsMember) WSNUM from EntInfo ent where ent.indid='11') i
2---
select * from
(
select sum(BizMoney) BizMoney,sum(TaxMoney) TaxMoney,sum(ThisProfit+ThatProfit) ThisProfit
from entdata_q q where q.entid in (select entid from entinfo ent where ent.indid='11') and to_char(q.reportdate,'yyyy')= to_char(sysdate,'yyyy')
union all
select sum(BizMoney) BizMoney,sum(TaxMoney) TaxMoney,sum(ThisProfit+ThatProfit) ThatProfit
from entdata_q q where q.entid in (select entid from entinfo ent where ent.indid='11') and to_char(q.reportdate,'yyyy')= (to_char(sysdate,'yyyy') - 1)
)
表21:
select sum(thisincome) bq,sum(thatincome) sq,sum(thisprofit) bqze,sum(thatprofit) sqze,ent.indname
from entinfo ent,EntData_M m where ent.entid=m.entid group by ent.indname