zoukankan      html  css  js  c++  java
  • --投资情况统计详情sql


    --投资情况统计详情sql
    select BidRecord.*, RegInfo.UserName,UserInfo.phone,BorrowInfo.Title,BorrowInfo.BorrowCode from
    --(select * from [YYD_Account_MoneyRecord] where moneytype='参与投标' and state=1) as MoneyRecord
    (select * from YYD_Borrow_BidRecord where status=1 and
    borrow_id in(select borrow_id from YYD_Borrow_borrowinfo_ext as ext where ext.borrow_product<>50)) as BidRecord

    left join
    (select * from YYD_Users_RegInfo) as RegInfo
    on BidRecord.bid_user_id=RegInfo.ID
    left join
    (select * from YYD_Users_UserInfo) as UserInfo
    on BidRecord.bid_user_id=UserInfo.user_id
    left join
    (select * from YYD_Borrow_BorrowInfo) as BorrowInfo
    on BidRecord.borrow_id= BorrowInfo.ID
    where Convert(varchar(10),BidRecord.createtime,120)='2016-07-11'
    and (BorrowInfo.Title like '%%' or BorrowInfo.BorrowCode like '%%')
    union
    select BidRecord.*, RegInfo.UserName,UserInfo.phone,BorrowInfo.bTitle+'['+BorrowInfo.qishu+']','' from
    --(select * from [YYD_Account_MoneyRecord] where moneytype ='加入计划' and state=1) as MoneyRecord
    (select * from YYD_Borrow_BidRecord where status=1 and
    borrow_id in(select borrow_id from YYD_Borrow_borrowinfo_ext as ext where ext.borrow_product<>50)) as BidRecord

    left join
    (select * from YYD_Users_RegInfo) as RegInfo
    on BidRecord.bid_user_id=RegInfo.ID
    left join
    (select * from YYD_Users_UserInfo) as UserInfo
    on BidRecord.bid_user_id=UserInfo.user_id
    left join
    (select * from HUR_NewPlanLoan) as BorrowInfo
    on BidRecord.borrow_id= BorrowInfo.ID
    where Convert(varchar(10),BidRecord.createtime,120)='2016-07-11'
    and (BorrowInfo.bTitle+'['+BorrowInfo.qishu+']' like '%%')
    order by createtime desc

  • 相关阅读:
    slf4j绑定log4j失败
    [转]activiti5用户任务分配
    关于ajax提交的公共接口的一大用处
    jQuery插件开发方式
    centos7安装mysql
    Centos7安装JDK
    奇葩问题:spring+mybaits项目突然出现其中一些Mapper类找不到
    JAVA多线程下,获取递增的序列号
    库存扣减的流水账记录问题
    My97DatePicker使用的问题
  • 原文地址:https://www.cnblogs.com/zxtceq/p/5703750.html
Copyright © 2011-2022 走看看