SQL练习_1
来源:互联网 发布:payload c语言 编辑:程序博客网 时间:2024/06/05 01:09
select invest.id,
(select t.cr_customer_number
from crm_customer@dl.crm t
where t.id = invest.customer_id) || '-' || invest.lending_no as 出借编号,
(select NODE_NAME
from FT_T_FLOW_DEF c
where invest.flow_id = c.node_code) as 流程ID,
(select data_name
from sys_t_dictionary b
where invest.product_type = b.data_code) as 理财产品,
(select sum(trunc(f.debt_proportion * l.amount_spare, 2))
from ac_t_ledger_loan@dl.core l,ac_t_ledger_finance@dl.core f
where l.id = f.loan_id
and f.acct_status in (1, 3, 4)
and l.acct_status in (1, 3, 4)
and f.ledger_id in
(select t.id
from ac_t_ledger@dl.core t
where t.account in (select t1.acc_id
from ft_t_invest_info t1
where t1.id = invest.id))) as pv,
invest.invest_amt as 投资金额
from ft_t_invest_info invest
where customer_id = 111;
(select t.cr_customer_number
from crm_customer@dl.crm t
where t.id = invest.customer_id) || '-' || invest.lending_no as 出借编号,
(select NODE_NAME
from FT_T_FLOW_DEF c
where invest.flow_id = c.node_code) as 流程ID,
(select data_name
from sys_t_dictionary b
where invest.product_type = b.data_code) as 理财产品,
(select sum(trunc(f.debt_proportion * l.amount_spare, 2))
from ac_t_ledger_loan@dl.core l,ac_t_ledger_finance@dl.core f
where l.id = f.loan_id
and f.acct_status in (1, 3, 4)
and l.acct_status in (1, 3, 4)
and f.ledger_id in
(select t.id
from ac_t_ledger@dl.core t
where t.account in (select t1.acc_id
from ft_t_invest_info t1
where t1.id = invest.id))) as pv,
invest.invest_amt as 投资金额
from ft_t_invest_info invest
where customer_id = 111;
- SQL练习_1
- 练习_1
- python练习_1 水仙花数_1
- HTTP协议分析练习_1
- python 入门练习笔记_1
- SQL日记_1
- 三、SQL语句:查询_1
- [c++,小练习] 日常小程序_1
- python_学习笔记_基础练习_1
- Python练习_1 水仙花数_2
- Python练习_1 水仙花数_3
- sql练习
- SQL练习
- sql练习
- sql练习
- sql练习
- sql 练习
- SQL练习
- 东软实训心得:职业生涯的起点
- discuz x3 怎样设置,打开默认的是门户页面,而不是论坛
- Tools for HTML5 developer
- 使用 sz rz下载和上传文件
- 最长公共子序列(LCS)问题分析
- SQL练习_1
- jquery load函数传递数组
- 关于RGB、YUY2、YUYV、YVYU、UYVY、AYUV DirectShow中常见的RGB/YUV格式
- 给大学生学习ARM和FPGA的建议(周立功)
- 设计模式 -- 观察者模式
- 【C语言】求最大公约数/最小公倍数
- Java基础加强二注解、泛型、类加载器、代理类
- c++事件内核对象(event)进程间激活
- RMQ算法