码迷,mamicode.com
首页 > 数据库 > 详细

SQL查询数据练习(2019上半年金融服务申请数据统计)

时间:2019-07-03 16:56:59      阅读:216      评论:0      收藏:0      [点我收藏+]

标签:银行   and   dde   ESS   create   code   weight   nba   end   

1.记录意向且拍卖成交的数据:

select row_number() over(order by LoanPreApply.CreateDate asc) as 序号,LoanPreApply.Proposer as 中标者,LoanPreApply.BidderNo as 中标号,LoanBank.BankName as 申请银行, LoanPreApply.CreateDate as 申请时间 from LoanPreApply,LoanBank where  LoanPreApply.BankId=LoanBank.BankId and LoanPreApply.CreateDate>2019-01-01 and  LoanPreApply.CreateDate<2019-07-01

2.支付后分期柜面申请数据:

select row_number() over(order by LoanApply.ApplyTime asc) as 序号,LoanApply.Proposer as 中标者,LoanApply.BidderNo as 中标号,LoanBank.BankName as 申请银行, LoanApply.ApplyTime as 申请时间 from LoanApply,LoanBank where  LoanApply.BankId=LoanBank.BankId and LoanApply.ApplyType=1 and LoanApply.BusinessType=1 and  LoanApply.ApplyTime>2019-01-01 and  LoanApply.ApplyTime<2019-07-01

3.所有申请表

select row_number() over(order by LoanApply.ApplyTime asc) as 序号,LoanApply.Proposer as 中标者,LoanApply.BidderNo  as 中标号,LoanBank.BankName as 申请银行,(case LoanApply.AcceptStatus when 1 then 已受理 else 未受理 end) as 受理状态,(case LoanApply.CheckStatus when 1 then 已通过 else 未通过 end) as 通过状态,(case LoanApply.PaymentStatus when 1 then 已打款 else 未打款 end) as 打款状态,(case LoanApply.MoneyCheckStatus when 1 then 已核账 else 未核账 end) as 核账状态,LoanApply.ApplyTime as 申请时间 from LoanApply,LoanBank where  LoanApply.BankId=LoanBank.BankId and  LoanApply.ApplyTime>2019-01-01 and  LoanApply.ApplyTime<2019-07-01 

 

SQL查询数据练习(2019上半年金融服务申请数据统计)

标签:银行   and   dde   ESS   create   code   weight   nba   end   

原文地址:https://www.cnblogs.com/yechangzhong-826217795/p/11127081.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!