level 8
select branch_id,product_id,sum(curr_bal)
from dms_gen_indcat_date
where date_id='2012-07-30' and length(rtrim(product_id))=4
and product_id>='1301' and product_id<='1308' and curr_bal<>0
and branch_id in (
select bank_org_id from dmd_bank_relation
where substr(bank_org_rela_code,2,1)='1')
and curr_id='01'
group by branch_id,product_id
order by branch_id,product_id;
2012年08月05日 09点08分
8