SQLÓï¾ä£ºselect ºÏ¼Æ±í.ÓªÏúÖÐÐÄ,cust_type.cust_type_,sum(Ã÷ϸ±í.charge) as ºÏ¼Æ from ºÏ¼Æ±í,cust_type,Ã÷ϸ±í where ºÏ¼Æ±í.·þÎñʵÀýºÅÂë=cust_type.acc_nbr and ºÏ¼Æ±í.·þÎñʵÀýºÅÂë=Ã÷ϸ±í.acc_nbr and Ã÷ϸ±í.acc_nbr=cust_type.acc_nbr group by ºÏ¼Æ±í.ÓªÏúÖÐÐÄ,cust_type.cust_type_ order by ºÏ¼Æ±í.ÓªÏúÖÐÐÄ,cust_type.cust_type_µÄЧ¹ûÊÇÕâÑùµÄ
µÚÒ»¾ä: select ht.gfdm,gfdm.gfmc,gfdm.lb ,sum(jh.htdj*jh.htsl)as je from ht left join gfdm on ht.gfdm=gfdm.gfdm join jh on ht.htbh=jh.hth and ht.htbh not like'del%' and ht. ......