SQL查询数据练习(2019上半年金融服务申请数据统计)
Posted yechangzhong-826217795
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SQL查询数据练习(2019上半年金融服务申请数据统计)相关的知识,希望对你有一定的参考价值。
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上半年金融服务申请数据统计)的主要内容,如果未能解决你的问题,请参考以下文章