非額度合同和額度合同

2022-06-14 14:12:10 字數 3485 閱讀 9225

--非額度合同

select con.contract_num,

round((case when sum(grt.guaranty_amt) >= con.contract_total_amt then

con.contract_total_amt

else

sum(grt.guaranty_amt) end) /con.contract_total_amt*su.contract_balance,2)

from tb_con_contract con,

tb_con_borr_acct_summary bo,

tb_con_acct_summary su,

tb_con_subcontract sub,

tb_grt_business_relation grt,

tb_grt_collateral coll,

tb_biz_business biz,

tb_con_payout_info_detail det,

(select contract_num,

ltrim(decode(substr(guaranty_type, 12, 1), '1', '信用') || decode(substr(guaranty_type, 13, 1), '1', ';保證') ||

decode(substr(guaranty_type, 14, 1), '1', ';抵押') || decode(substr(guaranty_type, 15, 1), '1', ';質押') ||

decode(substr(guaranty_type, 16, 1), '1', ';保證金') || decode(substr(guaranty_type, 17, 1), '1', ';其他'),

';') guaranty_type

from tb_con_contract) co

where con.contract_num = sub.contract_num

and con.contract_num = bo.contract_num

and con.contract_num = su.contract_num

and con.contract_num = co.contract_num

and sub.subcontract_num = grt.biz_limit_cont_num

and grt.guaranty_id = coll.guaranty_id

and con.biz_num = biz.biz_num

and bo.borrow_num = det.borrow_num

and grt.guaranty_relation_type_cd = '4'

and biz.biz_nature_cd not in ('04','26') ----非額度合同項下業務

and co.guaranty_type like '%抵押%'

and grt.valid_ind = '1' --生效

and con.credit_product_cd <> '031402' --小企業法人按揭貸款

and substr(coll.collateral_catalog_cd,0,1) = 'c' --房地產

group by con.contract_num,con.contract_total_amt,su.contract_balance;

--額度合同

select con.contract_num,

round((case when sum(grt.guaranty_amt) >= cc.contract_total_amt then

su.contract_balance

else

sum(grt.guaranty_amt) end)/cc.contract_total_amt*su.contract_balance,2)

from tb_con_contract con,

tb_con_borr_acct_summary bo,

tb_con_acct_summary su,

tb_con_guaranty_relation sub,

tb_grt_business_relation grt,

tb_grt_collateral coll,

tb_biz_business biz,

tb_con_payout_info_detail det,

(select contract_num,

ltrim(decode(substr(guaranty_type, 12, 1), '1', '信用') || decode(substr(guaranty_type, 13, 1), '1', ';保證') ||

decode(substr(guaranty_type, 14, 1), '1', ';抵押') || decode(substr(guaranty_type, 15, 1), '1', ';質押') ||

decode(substr(guaranty_type, 16, 1), '1', ';保證金') || decode(substr(guaranty_type, 17, 1), '1', ';其他'),

';') guaranty_type

from tb_con_contract) co,

tb_con_contract cc

where con.contract_num = sub.contract_num

and con.contract_num = bo.contract_num

and con.contract_num = su.contract_num

and con.contract_num = co.contract_num

and sub.subcontract_num = grt.biz_limit_cont_num

and grt.guaranty_id = coll.guaranty_id

and con.biz_num = biz.biz_num

and con.super_contract_num = cc.contract_num

and bo.borrow_num = det.borrow_num

and grt.guaranty_relation_type_cd = '4'

and biz.biz_nature_cd in ('04','26')

and co.guaranty_type like '%抵押%'

and grt.valid_ind = '1'

and con.credit_product_cd <> '031402' --小企業法人按揭貸款

and substr(coll.collateral_catalog_cd,0,1) = 'c' --房地產

group by con.contract_num,cc.contract_total_amt,su.contract_balance;

嘉和生物開啟認購,富途備足150億額度等你來「撩」

今年以來港股打新收益可觀,截至 9 月中,在香港交易所主機板上市的 89 只新股首日 率 0 達58.43 首日平均漲幅達18 如果每只新股都打中一手並在首日 賣出,今年以來累計一手利潤可達9.7 萬港元,遠超 2019 年全年一手累計收益。許多投資者也意識到港股打新易入門 好上手,港股打新已成為備...

現貨交易 遠期合同交易和期貨交易

以商業交易的時間序列差異為標誌,商業交易方式可以劃分為現貨交易 遠期合同交易和 交易。商業的發展 商業交易方式的演進過程,實際上就是不斷尋找克服商品的供與求之間的各種矛盾的過程。自從有了商品生產和商品流通,商品的供給與需求之間就存在著時間上 空間上 數量上 上 品種結構上 質量結構上等各種矛盾。當現...

如何寫乙個精益和敏捷合同

在精益敏捷郵件列表,艾倫shalloway寫道 你會怎麼推薦為好措施,你可以到乙個合同 或工程進度 寫來跟蹤進度 對軟體承包商的成效?這個 問題 不可知雖然偏向敏捷 精益 看板。品牌排行榜 傑夫安德森有一些具體建議 以下是我在合同包括剛剛布置完畢。我們有實際與客戶合作,完成一些故事,所以我們有什麼期...