--投资情况统计详情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

--投资情况统计详情sql的更多相关文章

  1. mysql统计类似SQL语句查询次数

    mysql统计类似SQL语句查询次数 vc-mysql-sniffer 工具抓取的sql分析. 1.先用shell脚本把所有enter符号替换为null,再根据语句前后的字符分隔语句 grep -Ev ...

  2. MySQL邮件使用情况统计方法

    邮件使用情况统计方法如下: ) AS domain, COUNT(DISTINCT [column_name]) AS mail_count, COUNT([column_name]) AS mail ...

  3. java基础 File与递归练习 使用文件过滤器筛选将指定文件夹下的小于200K的小文件获取并打印按层次打印(包括所有子文件夹的文件) 多层文件夹情况统计文件和文件夹的数量 统计已知类型的数量 未知类型的数量

    package com.swift.kuozhan; import java.io.File; import java.io.FileFilter; /*使用文件过滤器筛选将指定文件夹下的小于200K ...

  4. Oracle中统计block空闲情况的一个SQL语句

    此SQL来自网络,地址见具体内容.介绍表空间回收原理的文章参考此链接: https://oracle-base.com/articles/misc/reclaiming-unused-space#sh ...

  5. 投资统计查询sql

    select COUNT(*) from YYD_Users_RegInfo where regTime between '2016-07-11 00:00:00' and '2016-07-11 2 ...

  6. Oracle EBS-SQL (PO-16):检查采购订单完成情况统计.sql

    select         e.FULL_NAME                                                     采购员,         sum(plla ...

  7. 个人网站对xss跨站脚本攻击(重点是富文本编辑器情况)和sql注入攻击的防范

    昨天本博客受到了xss跨站脚本注入攻击,3分钟攻陷--其实攻击者进攻的手法很简单,没啥技术含量.只能感叹自己之前竟然完全没防范. 这是数据库里留下的一些记录.最后那人弄了一个无限循环弹出框的脚本,估计 ...

  8. Office 365 Licence使用情况统计

    负责采购的同事需要知道目前公司使用了多少License,但是通过O365控制台界面似乎无法直接导出License使用量的信息,于是让我帮忙从后台统计一下. $mail_text = Read-Host ...

  9. 一个统计报表sql问题

    今天朋友问我了一个统计报表的sql问题.我弄了好久.终于算是写出来了.这里记录下. 问题:  id--------------name--------------addtime1            ...

随机推荐

  1. Spring 读书笔记-----使用Spring容器(一)

    pring有两个核心接口:BeanFactory和ApplicationContext,其中ApplicationContext是BeanFactory的子接口.他们都可代表Spring容器,Spri ...

  2. Monkey学习(3)如何在Android模拟器中安装apk

    1.运行SDK Manager,选择模拟器,并运行模拟器,我这里用的是已经配置好的模拟器“RedMI” 2.已启动好的模拟器“RedMI” 3.记住需要安装apk文件的位置,我这里放在了F盘的根目录下 ...

  3. 集群--LVS的DR模型配置

    1.查看内核是否有IPVS内核模块 grep -i 'ip_vs' /boot/config-2.6.32-431.el6.x86_64

  4. Python中的__new__()方法的使用

    __new__() 函数只能用于从object继承的新式类. 先看下object类中对__new__()方法的定义: class object:   @staticmethod # known cas ...

  5. (二)miller指导查看主控板寄存器操作

    Welcome to Command Shell!Username:admin Password:***** ROS>en ROS# ROS# ROS# ROS# ROS#^ada ROS(ad ...

  6. 杨辉三角 && 鸽兔同校

    杨辉三角: 用个一维数组直接模拟就行,只是 C++ 的高精度调了好久,后来发现能用 python ,于是试着写了写: dp = [] def out(L, end): for i in range(e ...

  7. neon汇编,C嵌入汇编

    1. Neon-intrics.pdf中的 void vst2q_u16(__transfersize(16) uint16_t * ptr, uint16x8x2_t val);// VST2.16 ...

  8. python操作mongodb之二聚合查询

    #聚合查询 from pymongo import MongoClient db = MongoClient('mongodb://10.0.0.9:27017/').aggregation_exam ...

  9. C++ Primer 第三章 标准库类型vector+迭代器iterator 运算

    1.vector: 标准库类型vector表示对象的集合,其中所有对象的类型都相同,集合中的每个对象都有一个与之对应的索引,索引用于访问对象.因为vector“容纳着”其他对象,所以它也常被称作容器( ...

  10. js倒计时天时分秒[转]

    <script language="JavaScript"> <!-- // function getQueryString(name) { var reg =n ...